Package com.sun.codemodel
Class JArrayCompRef
- java.lang.Object
-
- com.sun.codemodel.JExpressionImpl
-
- com.sun.codemodel.JArrayCompRef
-
- All Implemented Interfaces:
JAssignmentTarget
,JExpression
,JGenerable
final class JArrayCompRef extends JExpressionImpl implements JAssignmentTarget
array component reference.
-
-
Field Summary
Fields Modifier and Type Field Description private JExpression
array
JArray expression upon which this component will be accessed.private JExpression
index
Integer expression representing index of the component
-
Constructor Summary
Constructors Constructor Description JArrayCompRef(JExpression array, JExpression index)
JArray component reference constructor given an array expression and index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JExpression
assign(JExpression rhs)
JExpression
assignPlus(JExpression rhs)
void
generate(JFormatter f)
-
Methods inherited from class com.sun.codemodel.JExpressionImpl
_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
-
-
-
-
Field Detail
-
array
private final JExpression array
JArray expression upon which this component will be accessed.
-
index
private final JExpression index
Integer expression representing index of the component
-
-
Constructor Detail
-
JArrayCompRef
JArrayCompRef(JExpression array, JExpression index)
JArray component reference constructor given an array expression and index.- Parameters:
array
- JExpression for the array upon which the component will be accessed,index
- JExpression for index of component to access
-
-
Method Detail
-
generate
public void generate(JFormatter f)
- Specified by:
generate
in interfaceJGenerable
-
assign
public JExpression assign(JExpression rhs)
- Specified by:
assign
in interfaceJAssignmentTarget
-
assignPlus
public JExpression assignPlus(JExpression rhs)
- Specified by:
assignPlus
in interfaceJAssignmentTarget
-
-