public class JFieldRef extends JVariableRef implements HasEnclosingType
target
Constructor and Description |
---|
JFieldRef(SourceInfo info,
JExpression instance,
JField field,
JDeclaredType enclosingType) |
JFieldRef(SourceInfo info,
JExpression instance,
JField field,
JDeclaredType enclosingType,
JType overriddenType) |
Modifier and Type | Method and Description |
---|---|
JDeclaredType |
getEnclosingType() |
JField |
getField() |
JExpression |
getInstance() |
JType |
getType()
Returns the type of this expression.
|
boolean |
hasClinit() |
boolean |
hasSideEffects() |
void |
resolve(JField newField)
Resolve an external reference during AST stitching.
|
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
getTarget
makeStatement
getSourceInfo, setSourceInfo, toSource, toString
public JFieldRef(SourceInfo info, JExpression instance, JField field, JDeclaredType enclosingType)
public JFieldRef(SourceInfo info, JExpression instance, JField field, JDeclaredType enclosingType, JType overriddenType)
public JDeclaredType getEnclosingType()
getEnclosingType
in interface HasEnclosingType
public JField getField()
public JExpression getInstance()
public JType getType()
HasType
getType
in interface HasType
getType
in class JVariableRef
public boolean hasClinit()
public boolean hasSideEffects()
hasSideEffects
in class JExpression
public void resolve(JField newField)
public void traverse(JVisitor visitor, Context ctx)
JVisitable
traverse
in interface JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.