Class JIdentifier
- java.lang.Object
- 
- com.inductiveautomation.snap.javatree.JNode
- 
- com.inductiveautomation.snap.javatree.JExpr
- 
- com.inductiveautomation.snap.javatree.JIdentifier
 
 
 
- 
 public class JIdentifier extends JExpr A JExpr subclass for identifiers.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classJIdentifier.IdType- 
Nested classes/interfaces inherited from class com.inductiveautomation.snap.javatree.JExprJExpr.AllocationExpr, JExpr.ArrayIndexExpr, JExpr.CastExpr
 
- 
 - 
Constructor SummaryConstructors Constructor Description JIdentifier()Creates a new identifier.JIdentifier(JType aType)Creates a new identifier for given JType: this probably needs to go!JIdentifier(java.lang.String aName)Creates a new identifier for given value.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetClassNameImpl()Tries to resolve the class name for this node.JIdentifier.IdTypegetIdentifierType()Returns the Identifier type: Variable, Field, Class or Package (tries to resolve it if unknown).JMethodCallgetMethodCall()Returns the method call if parent is method call.JMethodDeclgetMethodDecl()Returns the method declaration if parent is method declaration.java.lang.StringgetNodeString()Returns the part name.java.util.List<JNode>getOthers()Returns a list of other ids for this id.java.lang.StringgetPackageName()Returns the full package name for this package identifier.JVariableDeclgetVariableDecl()Returns the Identifier variable declaration.booleanisClassName()Returns whether this is Class identifier.booleanisFieldName()Returns whether this is ClassField identifier.booleanisMethodName()Returns whether this identifier is a method name.booleanisPackageName()Returns whether this is package identifier.booleanisVariableId()Returns whether this is variable identifier.voidsetName(java.lang.String aName)Sets the name for Identifier or Method.protected voidsetPackageName(java.lang.String aName)Returns the full package name for this package identifier.voidsetVariableDecl(JVariableDecl aVarDecl)Sets the Identifier variable declaration.- 
Methods inherited from class com.inductiveautomation.snap.javatree.JExprgetParentClassRef, getParentExpr
 - 
Methods inherited from class com.inductiveautomation.snap.javatree.JNodeaddChild, buildChildren, getBlock, getChild, getChildCount, getChildren, getClassLoader, getClassName, getClassRef, getClassRefImpl, getEnclosingClassDecl, getEnclosingMemberDecl, getEnclosingMethodDecl, getEnd, getEndToken, getFile, getJClass, getLineIndex, getName, getNameImpl, getNodeAtCharIndex, getNodeFields, getNodeFieldsImpl, getNodeParents, getNodePath, getParent, getParent, getReferencedClasses, getReferencedClassNames, getReferencedClassNames, getReferencedClassNames, getStart, getStartToken, getString, getVariableDecl, getVariableDeclInside, getVariableDecls, isBlock, setClassName, setClassRef, setEndToken, setJClass, setParent, setStartToken, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
JIdentifierpublic JIdentifier() Creates a new identifier.
 - 
JIdentifierpublic JIdentifier(java.lang.String aName) Creates a new identifier for given value.
 - 
JIdentifierpublic JIdentifier(JType aType) Creates a new identifier for given JType: this probably needs to go!
 
- 
 - 
Method Detail- 
setNamepublic void setName(java.lang.String aName) Sets the name for Identifier or Method.
 - 
getIdentifierTypepublic JIdentifier.IdType getIdentifierType() Returns the Identifier type: Variable, Field, Class or Package (tries to resolve it if unknown).
 - 
isVariableIdpublic boolean isVariableId() Returns whether this is variable identifier.
 - 
isClassNamepublic boolean isClassName() Returns whether this is Class identifier.
 - 
isFieldNamepublic boolean isFieldName() Returns whether this is ClassField identifier.
 - 
isMethodNamepublic boolean isMethodName() Returns whether this identifier is a method name.
 - 
getMethodCallpublic JMethodCall getMethodCall() Returns the method call if parent is method call.
 - 
getMethodDeclpublic JMethodDecl getMethodDecl() Returns the method declaration if parent is method declaration.
 - 
isPackageNamepublic boolean isPackageName() Returns whether this is package identifier.
 - 
getPackageNamepublic java.lang.String getPackageName() Returns the full package name for this package identifier.
 - 
setPackageNameprotected void setPackageName(java.lang.String aName) Returns the full package name for this package identifier.
 - 
getVariableDeclpublic JVariableDecl getVariableDecl() Returns the Identifier variable declaration.
 - 
setVariableDeclpublic void setVariableDecl(JVariableDecl aVarDecl) Sets the Identifier variable declaration.
 - 
getClassNameImplprotected java.lang.String getClassNameImpl() Tries to resolve the class name for this node.- Overrides:
- getClassNameImplin class- JNode
 
 - 
getNodeStringpublic java.lang.String getNodeString() Returns the part name.- Overrides:
- getNodeStringin class- JNode
 
 
- 
 
-