Class JVariableDecl
java.lang.Object
com.inductiveautomation.snap.javatree.JNode
com.inductiveautomation.snap.javatree.JVariableDecl
A JNode to represent a defined variable. Found in FieldDeclaration, Method.FormalParameter(s),
Block.BlockStatement.LocalVariableDeclaration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Tries to resolve the class name for this node.Returns the declaring class, if field variable.protected String
Resolves the name from identifier.Returns a list of references to this variable.protected void
getReferences
(JNode aPart, String aName, List theReferences) Returns a list of references to given name.getVariableDeclInside
(String aName) Returns a variable with given name.Methods inherited from class com.inductiveautomation.snap.javatree.JNode
addChild, buildChildren, getBlock, getChild, getChildCount, getChildren, getClassLoader, getClassName, getClassRef, getClassRefImpl, getEnclosingClassDecl, getEnclosingMemberDecl, getEnclosingMethodDecl, getEnd, getEndToken, getFile, getJClass, getLineIndex, getName, getNodeAtCharIndex, getNodeFields, getNodeFieldsImpl, getNodeParents, getNodePath, getNodeString, getOthers, getParent, getParent, getReferencedClasses, getReferencedClassNames, getReferencedClassNames, getReferencedClassNames, getStart, getStartToken, getString, getVariableDecl, getVariableDecls, isBlock, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
-
Field Details
-
type
-
identifier
-
arrayCount
public int arrayCount -
initializer
-
arrayInitializer
-
-
Constructor Details
-
JVariableDecl
public JVariableDecl()
-
-
Method Details
-
getNameImpl
Resolves the name from identifier.- Overrides:
getNameImpl
in classJNode
-
getDeclaringClass
Returns the declaring class, if field variable. -
getClassNameImpl
Tries to resolve the class name for this node.- Overrides:
getClassNameImpl
in classJNode
-
getReferences
Returns a list of references to this variable. -
getReferences
Returns a list of references to given name. -
getVariableDeclInside
Returns a variable with given name.- Overrides:
getVariableDeclInside
in classJNode
-