Package org.jtool.srcmodel
Class JavaLocalVar
java.lang.Object
org.jtool.srcmodel.JavaElement
org.jtool.srcmodel.JavaVariable
org.jtool.srcmodel.JavaLocalVar
An object representing a local variable or a formal parameter.
-
Field Summary
Fields inherited from class org.jtool.srcmodel.JavaVariable
isPrimitive, jfile, kind, modifiers, qname, type
Fields inherited from class org.jtool.srcmodel.JavaElement
astNode, codeRange
-
Constructor Summary
ConstructorsConstructorDescriptionJavaLocalVar
(org.eclipse.jdt.core.dom.VariableDeclaration node, JavaMethod jmethod) Creates a new object representing a local variable. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equals
(JavaLocalVar jlocal) Tests if a given local variable is equal to this local variable.org.eclipse.jdt.core.dom.IVariableBinding
Returns the variable binding information on this local variable.long
Returns the identification number of this local variable.int
hashCode()
toString()
Obtains information on this local variable.Methods inherited from class org.jtool.srcmodel.JavaVariable
getClassName, getFile, getJavaProject, getKind, getModifiers, getName, getQualifiedName, getType, isEnumConstant, isField, isFinal, isLocal, isParameter, isPrimitiveType
Methods inherited from class org.jtool.srcmodel.JavaElement
getASTNode, getCodeRange, getSource
-
Constructor Details
-
JavaLocalVar
Creates a new object representing a local variable. This constructor is not intended to be invoked by clients.- Parameters:
node
- the AST node for this local variablejmethod
- the method that contains this local variable in its body
-
-
Method Details
-
getVariableBinding
public org.eclipse.jdt.core.dom.IVariableBinding getVariableBinding()Returns the variable binding information on this local variable.- Returns:
- the variable binding information
-
getVariableId
public long getVariableId()Returns the identification number of this local variable.- Returns:
- the identification number
-
equals
-
equals
Tests if a given local variable is equal to this local variable.- Parameters:
jlocal
- the local variable to be checked- Returns:
- the
true
if the given local variable is equal to this local variable
-
hashCode
public int hashCode() -
toString
Obtains information on this local variable.
-