Class 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 Detail

      • 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 Detail

      • toXmir

        public org.xembly.Directives toXmir()
        Description copied from interface: Xmir
        Convert node to XMIR.
        Specified by:
        toXmir in interface Xmir
        Returns:
        XMIR XML.
      • 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.
        To do:
        #201:90min Fix 'staticize' optimization. We need to use of the default value below because outdated 'staticize' optimization doesn't add 'interfaced' attribute to some methods. Particulary, scope="name=get|descriptor=()I|owner=org/eolang/benchmark/StaticizedA|type=method" in class A should contain 'interfaced=false'. To implement this, we need to send a PR to ineo-maven-plugin repository. See https://github.com/objectionary/ineo-maven-plugin
      • interfaced

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