Class ASTFieldDeclaration

    • Method Detail

      • getPreferredReportLocation

        protected @Nullable JavaccToken getPreferredReportLocation()
        Temporary hack so that classes and methods are reported on their identifier token and not the first annotation. Changes about text documents make that more general, in a future PR.
      • acceptVisitor

        protected <P,​R> R acceptVisitor​(JavaVisitor<? super P,​? extends R> visitor,
                                              P data)
      • getVariableName

        public String getVariableName()
        FieldDeclaration may declare several variables, so this is not exhaustive Iterate on the VariableDeclaratorIds instead
        Gets the variable name of this field. This method searches the first VariableDeclaratorId node and returns its image or null if the child node is not found.
        a String representing the name of the variable
      • getTypeNode

        public ASTType getTypeNode()
        Returns the type node at the beginning of this field declaration. The type of this node is not necessarily the type of the variables, see ASTVariableDeclaratorId.getType().
      • acceptVisitor

        public final <P,​R> R acceptVisitor​(AstVisitor<? super P,​? extends R> visitor,
                                                 P data)
        Specified by:
        acceptVisitor in interface Node
      • addChild

        protected void addChild​( child,
                                int index)
        addChild in class AbstractJjtreeNode<,​JavaNode>
      • insertChild

        protected void insertChild​( child,
                                   int index)
        insertChild in class AbstractJjtreeNode<,​JavaNode>
      • removeChildAtIndex

        protected void removeChildAtIndex​(int childIndex)
        removeChildAtIndex in class AbstractNode<,​JavaNode>
      • setChild

        protected void setChild​( child,
                                int index)
        setChild in class AbstractNode<,​JavaNode>
      • getSymbolTable

        public @NonNull JSymbolTable getSymbolTable()
        Description copied from interface: JavaNode
        Returns the symbol table for the program point represented by this node.
        Specified by:
        getSymbolTable in interface JavaNode
      • getTypeSystem

        public TypeSystem getTypeSystem()
        Description copied from interface: JavaNode
        Returns the type system with which this node was created. This is the object responsible for representing types in the compilation unit.
        Specified by:
        getTypeSystem in interface JavaNode