Class AST

  • All Implemented Interfaces:
    org.antlr.runtime.tree.Tree

    public class AST
    extends org.antlr.runtime.tree.CommonTree
    • Field Detail

      • uri

        protected java.net.URI uri
      • line

        protected java.lang.Integer line
      • column

        protected java.lang.Integer column
      • region

        protected Region region
      • annotations

        protected AST annotations
      • imaginary

        protected boolean imaginary
      • extraTokens

        protected java.util.List<org.antlr.runtime.Token> extraTokens
      • commentTokens

        protected java.util.List<org.antlr.runtime.Token> commentTokens
      • descendants

        protected java.util.List<AST> descendants
      • properties

        protected java.util.HashMap<java.lang.String,​java.lang.Object> properties
    • Constructor Detail

      • AST

        public AST()
      • AST

        public AST​(org.antlr.runtime.tree.CommonTree commontree)
      • AST

        public AST​(org.antlr.runtime.Token token,
                   AST real)
      • AST

        public AST​(org.antlr.runtime.Token token)
      • AST

        public AST​(org.antlr.runtime.Token token,
                   java.net.URI uri)
      • AST

        public AST​(org.antlr.runtime.Token token,
                   java.net.URI uri,
                   IModule module)
    • Method Detail

      • build

        public void build()
      • getModule

        public IModule getModule()
      • setModule

        public void setModule​(IModule module)
      • setUri

        public void setUri​(java.net.URI uri)
      • setAnnotationsAst

        public AST setAnnotationsAst​(AST annotations)
      • getAnnotationsAst

        public AST getAnnotationsAst()
      • getProperties

        public java.util.HashMap<java.lang.String,​java.lang.Object> getProperties()
      • getBasename

        public java.lang.String getBasename()
        Returns the basename of the URI of this AST, which is the last segment of its URI. getFile() returns null for non- file:/// URIs, which is correct in its own regard, but may produce NPEs in our case.
      • getFile

        public java.io.File getFile()
      • getUri

        public java.net.URI getUri()
      • getChildren

        public java.util.List<AST> getChildren()
        Overrides:
        getChildren in class org.antlr.runtime.tree.BaseTree
      • getParent

        public AST getParent()
        Specified by:
        getParent in interface org.antlr.runtime.tree.Tree
        Overrides:
        getParent in class org.antlr.runtime.tree.CommonTree
      • setLine

        public AST setLine​(int line)
      • getLine

        public int getLine()
        Specified by:
        getLine in interface org.antlr.runtime.tree.Tree
        Overrides:
        getLine in class org.antlr.runtime.tree.CommonTree
      • setColumn

        public AST setColumn​(int column)
      • getColumn

        public int getColumn()
      • getNextSibling

        public AST getNextSibling()
      • setNextSibling

        public AST setNextSibling​(AST sibling)
      • hasChildren

        public boolean hasChildren()
      • getChild

        public AST getChild​(int i)
        Specified by:
        getChild in interface org.antlr.runtime.tree.Tree
        Overrides:
        getChild in class org.antlr.runtime.tree.BaseTree
      • getNumberOfChildren

        public int getNumberOfChildren()
      • getFirstChild

        public AST getFirstChild()
      • setFirstChild

        public AST setFirstChild​(AST child)
      • getSecondChild

        public AST getSecondChild()
      • getThirdChild

        public AST getThirdChild()
      • getFourthChild

        public AST getFourthChild()
      • getRegion

        public Region getRegion()
      • setToken

        public void setToken​(org.antlr.runtime.Token token)
      • getDescendants

        public java.util.List<AST> getDescendants()
      • collectDescendants

        protected void collectDescendants​(AST ast,
                                          java.util.List<AST> descendants,
                                          boolean addAst)
      • setRegion

        public void setRegion​(Region region)
      • setImaginary

        public void setImaginary​(boolean imaginary)
      • isImaginary

        public boolean isImaginary()
      • getExtraTokens

        public java.util.List<org.antlr.runtime.Token> getExtraTokens()
      • setExtraTokens

        public void setExtraTokens​(java.util.List<org.antlr.runtime.Token> extraTokens)
      • getCommentTokens

        public java.util.List<org.antlr.runtime.Token> getCommentTokens()
      • setCommentTokens

        public void setCommentTokens​(java.util.List<org.antlr.runtime.Token> comments)
      • toExtendedStringTreeItem

        public java.lang.String toExtendedStringTreeItem()
      • toExtendedStringTree

        public java.lang.String toExtendedStringTree()
      • toExtendedStringTree

        protected java.lang.String toExtendedStringTree​(int indent)