Class Attributes

java.lang.Object
org.eolang.opeo.ast.Attributes
All Implemented Interfaces:
Xmir

public final class Attributes extends Object implements Xmir
Type attributes of AST nodes. This class is useful when we need to preserve the information about types of AST nodes.
Since:
0.1
  • Constructor Details

    • Attributes

      public Attributes(String raw)
      Constructor.
      Parameters:
      raw - Raw attributes
    • Attributes

      public Attributes(String... entries)
      Constructor.
      Parameters:
      entries - Attribute entry pairs.
    • Attributes

      public Attributes(org.eolang.jeo.representation.xmir.XmlNode node)
      Constructor.
      Parameters:
      node - Xmir representation of attributes.
    • Attributes

      public Attributes(Map<String,String> all)
      Constructor.
      Parameters:
      all - All attributes.
  • Method Details

    • toXmir

      public org.xembly.Directives toXmir()
      Description copied from interface: Xmir
      Convert node to XMIR.
      Specified by:
      toXmir in interface Xmir
      Returns:
      XMIR XML.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • descriptor

      public String descriptor()
      Get descriptor attribute.
      Returns:
      Descriptor value.
    • descriptor

      public Attributes descriptor(String descriptor)
      Set descriptor attribute.
      Parameters:
      descriptor - Descriptor
      Returns:
      This object
    • type

      public String type()
      Get type attribute.
      Returns:
      Type value.
    • type

      public Attributes type(String type)
      Set type attribute.
      Parameters:
      type - Type
      Returns:
      This object
    • owner

      public String owner()
      Get owner attribute.
      Returns:
      Owner value.
    • owner

      public Attributes owner(String owner)
      Set owner attribute.
      Parameters:
      owner - Owner
      Returns:
      This object
    • name

      public String name()
      Get name attribute.
      Returns:
      Name value.
    • name

      public Attributes name(String name)
      Set name attribute.
      Parameters:
      name - Name
      Returns:
      This object
    • interfaced

      public boolean interfaced()
      Get interfaced attribute.
      Returns:
      True if method is interfaced or not.
    • interfaced

      public Attributes interfaced(boolean interfaced)
      Set interfaced attribute.
      Parameters:
      interfaced - Interfaced method or not
      Returns:
      This object