public class JFieldRef extends JExpressionImpl implements JAssignmentTarget
Modifier and Type | Field and Description |
---|---|
private boolean |
explicitThis
Indicates if an explicit this should be generated
|
private java.lang.String |
name
Name of the field to be accessed.
|
private JGenerable |
object
Object expression upon which this field will be accessed, or
null for the implicit 'this'.
|
private JVar |
var
Variable to be accessed.
|
Constructor and Description |
---|
JFieldRef(JExpression object,
JVar v) |
JFieldRef(JExpression object,
java.lang.String name)
Field reference constructor given an object expression and field name
|
JFieldRef(JGenerable object,
JVar var,
boolean explicitThis) |
JFieldRef(JGenerable object,
java.lang.String name,
boolean explicitThis) |
JFieldRef(JType type,
JVar v) |
JFieldRef(JType type,
java.lang.String name)
Static field reference.
|
Modifier and Type | Method and Description |
---|---|
JExpression |
assign(JExpression rhs) |
JExpression |
assignPlus(JExpression rhs) |
void |
generate(JFormatter f) |
_instanceof, band, bor, cand, complement, component, cor, decr, div, eq, gt, gte, incr, invoke, invoke, lt, lte, minus, minus, mod, mul, ne, not, plus, ref, ref, shl, shr, shrz, xor
private JGenerable object
private java.lang.String name
var
is set.private JVar var
private boolean explicitThis
JFieldRef(JExpression object, java.lang.String name)
object
- JExpression for the object upon which
the named field will be accessed,name
- Name of field to accessJFieldRef(JExpression object, JVar v)
JFieldRef(JType type, java.lang.String name)
JFieldRef(JGenerable object, java.lang.String name, boolean explicitThis)
JFieldRef(JGenerable object, JVar var, boolean explicitThis)
public void generate(JFormatter f)
generate
in interface JGenerable
public JExpression assign(JExpression rhs)
assign
in interface JAssignmentTarget
public JExpression assignPlus(JExpression rhs)
assignPlus
in interface JAssignmentTarget