All Packages Class Hierarchy This Package Previous Next Index
Class openjava.ptree.ArrayAccess
java.lang.Object
|
+----openjava.ptree.PtreeObject
|
+----openjava.ptree.NonLeaf
|
+----openjava.ptree.ArrayAccess
- public class ArrayAccess
- extends NonLeaf
- implements Expression
The ArrayAccess
represents
an array access like :
a[3][2]
In this array access expression,
you can get a
by getExpression()
and can get [3][2]
by getDimExprList()
.
- See Also:
- Expression, DimExprList
-
ArrayAccess(Expression, DimExprList)
-
-
getDimExprList()
- Gets the dimexpr list.
-
getExpression()
- Gets the expression of array.
-
setDimExprList(DimExprList)
- Sets the dimexpr list.
-
setExpression(Expression)
- Sets the expression accessed as array.
-
writeCode()
- Writes the code this parse-tree presents for.
ArrayAccess
public ArrayAccess(Expression expr,
DimExprList diml)
writeCode
public void writeCode()
- Writes the code this parse-tree presents for.
- Overrides:
- writeCode in class NonLeaf
getExpression
public Expression getExpression()
- Gets the expression of array.
- Returns:
- the experssion accessed as array.
setExpression
public void setExpression(Expression expr)
- Sets the expression accessed as array.
- Parameters:
- expr - the experssion of array.
getDimExprList
public DimExprList getDimExprList()
- Gets the dimexpr list.
- Returns:
- the dimexpr list.
setDimExprList
public void setDimExprList(DimExprList dimexprs)
- Sets the dimexpr list.
- Parameters:
- dimexprs - the dimexpr list.
All Packages Class Hierarchy This Package Previous Next Index