Package org.jtool.cfg
Class JVariableReference
java.lang.Object
org.jtool.cfg.JReference
org.jtool.cfg.JVariableReference
- Direct Known Subclasses:
JFieldReference
,JLocalVarReference
A class that represents a reference to a variable.
-
Field Summary
Fields inherited from class org.jtool.cfg.JReference
astNode, codeRange, declaringClassName, declaringMethodName, enclosingClassName, enclosingMethodName, fqn, inProject, isPrimitiveType, modifiers, name, referenceForm, type
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JVariableReference
(org.eclipse.jdt.core.dom.ASTNode node) Creates a new object that represents a reference to a variable. -
Method Summary
Modifier and TypeMethodDescriptionReturns a prefix reference located prior to this reference.boolean
isFinal()
Tests if this is a reference to a final method.protected void
setProperties
(org.eclipse.jdt.core.dom.ASTNode node, String name, String type) Sets the properties of this variable reference.toString()
Obtains information on this variable reference.Methods inherited from class org.jtool.cfg.JReference
equals, equals, findEnclosingClass, findEnclosingClassName, findEnclosingMethod, findEnclosingMethodName, getASTNode, getCodeRange, getDeclaringClassName, getDeclaringMethodName, getEnclosingClassName, getEnclosingElement, getEnclosingMethodName, getModifiers, getName, getParameterString, getQualifiedClassName, getQualifiedMethodName, getQualifiedName, getReceiverName, getReferenceForm, getSignature, getSignature, getStartPosition, getType, getType, hashCode, isAliasReference, isAvailable, isConstructor, isDefault, isEnumConstant, isField, isFieldAccess, isInProject, isLocal, isLocalAccess, isMethod, isMethodCall, isPrimitiveType, isPrivate, isProtected, isPublic, isReturnValueReference, isUncoveredFieldReference, isUnsupportedReference, isVariableAccess, isVersatileReference, isVoidType
-
Constructor Details
-
JVariableReference
protected JVariableReference(org.eclipse.jdt.core.dom.ASTNode node) Creates a new object that represents a reference to a variable. This constructor is not intended to be invoked by clients.- Parameters:
node
- AST node corresponding to this reference
-
-
Method Details
-
setProperties
Sets the properties of this variable reference.- Parameters:
node
- the AST node for this variable referencename
- the name of this variable referencetype
- the type of the referenced variable
-
isFinal
public boolean isFinal()Tests if this is a reference to a final method.- Returns:
true
if this is a final method reference, otherwisefalse
-
getPrefix
Returns a prefix reference located prior to this reference.- Returns:
- the prefix reference
-
toString
Obtains information on this variable reference.
-