Class: sun.tools.tree.ArrayAccessExpression
- public class ArrayAccessExpression
- extends UnaryExpression
WARNING: The contents of this source file are not part of any
supported API. Code that depends on them does so at its own risk:
they are subject to change or removal without notice.
Inheritance
Superclass tree:- java.lang.Object
- sun.tools.tree.Node
- sun.tools.tree.Expression
- sun.tools.tree.UnaryExpression
- sun.tools.tree.ArrayAccessExpression
Methods
-
ArrayAccessExpressiontop
public ArrayAccessExpression(long where, Expression right, Expression index)constructor -
checkAmbigNametop
public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp, UnaryExpression loc)Check something that might be an AmbiguousName (refman 6.5.2). A string of dot-separated identifiers might be, in order of preference: If a type name is found, it rewrites itself as a TypeExpression. If a node decides it can only be a package prefix, it sets its type to Type.tPackage. The caller must detect this and act appropriately to verify the full package name.- a variable name followed by fields or types
- a type name followed by fields or types
- a package name followed a type and then fields or types
- Override hierarchy:
- checkAmbigName from Expression
-
checkAssignOptop
public Vset checkAssignOp(Environment env, Context ctx, Vset vset, Hashtable exp, Expression outside)- Override hierarchy:
- checkAssignOp from Expression
-
checkLHStop
- Override hierarchy:
- checkLHS from Expression
-
checkValuetop
Check expression type- Override hierarchy:
- checkValue from UnaryExpression
- checkValue from Expression
-
codeLValuetop
Code- Override hierarchy:
- codeLValue from Expression
-
codeLoadtop
- Override hierarchy:
- codeLoad from Expression
-
codeStoretop
- Override hierarchy:
- codeStore from Expression
-
codeValuetop
- Override hierarchy:
- codeValue from Expression
-
copyInlinetop
public Expression copyInline(Context ctx)Create a copy of the expression for method inlining- Override hierarchy:
- copyInline from UnaryExpression
- copyInline from Expression
-
costInlinetop
public int costInline(int thresh, Environment env, Context ctx)The cost of inlining this expression- Override hierarchy:
- costInline from UnaryExpression
- costInline from Expression
-
getAssignertop
An array access expression never requires the use of an access method to perform an assignment to an array element, though an access method may be required to fetch the array object itself.- Override hierarchy:
- getAssigner from Expression
-
getUpdatertop
An array access expression never requires a field updater.- Override hierarchy:
- getUpdater from Expression
-
inlinetop
Inline- Override hierarchy:
- inline from UnaryExpression
- inline from Expression
-
inlineLHStop
- Override hierarchy:
- inlineLHS from Expression
-
inlineValuetop
- Override hierarchy:
- inlineValue from UnaryExpression
- inlineValue from Expression
-
printtop
public void print(PrintStream out)Print- Override hierarchy:
- print from UnaryExpression
- print from Expression
- print from Node
-
toTypetop
-
toTypetop
Convert to a type- Override hierarchy:
- toType from Expression
Fields
-
index
Expression indexThe index expression for the array access. Note that ArrayAccessExpression also `moonlights' as a structure for storing array types (like Object[]) which are used as part of cast expressions. For properly formed array types, the value of index is null. We need to be on the lookout for null indices in true array accesses, and non-null indices in array types. We also need to make sure general purpose methods (like copyInline(), which is called for both) are prepared to handle either null or non-null indices.
