Class Attribute


  • public class Attribute
    extends java.lang.Object
    Track the names of attributes defined in arg lists, return values, scope blocks etc...
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String decl
      The entire declaration such as "String foo" or "x:int"
      AttributeDict dict
      Who contains us?
      java.lang.String initValue
      The optional attribute initialization expression
      java.lang.String name
      The name of the attribute "foo"
      org.antlr.runtime.Token token
      A Token giving the position of the name of this attribute in the grammar.
      java.lang.String type
      The type; might be empty such as for Python which has no static typing
    • Constructor Summary

      Constructors 
      Constructor Description
      Attribute()  
      Attribute​(java.lang.String name)  
      Attribute​(java.lang.String name, java.lang.String decl)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • decl

        public java.lang.String decl
        The entire declaration such as "String foo" or "x:int"
      • type

        public java.lang.String type
        The type; might be empty such as for Python which has no static typing
      • name

        public java.lang.String name
        The name of the attribute "foo"
      • token

        public org.antlr.runtime.Token token
        A Token giving the position of the name of this attribute in the grammar.
      • initValue

        public java.lang.String initValue
        The optional attribute initialization expression
    • Constructor Detail

      • Attribute

        public Attribute()
      • Attribute

        public Attribute​(java.lang.String name)
      • Attribute

        public Attribute​(java.lang.String name,
                         java.lang.String decl)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object