Class JVariableDecl


  • public class JVariableDecl
    extends JNode
    A JNode to represent a defined variable. Found in FieldDeclaration, Method.FormalParameter(s), Block.BlockStatement.LocalVariableDeclaration.
    • Field Detail

      • type

        public JType type
      • arrayCount

        public int arrayCount
      • initializer

        public JExpr initializer
      • arrayInitializer

        public java.lang.String arrayInitializer
    • Constructor Detail

      • JVariableDecl

        public JVariableDecl()
    • Method Detail

      • getNameImpl

        protected java.lang.String getNameImpl()
        Resolves the name from identifier.
        Overrides:
        getNameImpl in class JNode
      • getDeclaringClass

        public java.lang.Class getDeclaringClass()
        Returns the declaring class, if field variable.
      • getClassNameImpl

        protected java.lang.String getClassNameImpl()
        Tries to resolve the class name for this node.
        Overrides:
        getClassNameImpl in class JNode
      • getReferences

        public java.util.List<JIdentifier> getReferences()
        Returns a list of references to this variable.
      • getReferences

        protected void getReferences​(JNode aPart,
                                     java.lang.String aName,
                                     java.util.List theReferences)
        Returns a list of references to given name.