Class ArrayAccessExpression

  • All Implemented Interfaces:
    java.lang.Cloneable, Constants, RuntimeConstants

    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.
    • Field Detail

      • index

        Expression index
        The 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.
    • Constructor Detail

      • ArrayAccessExpression

        public ArrayAccessExpression​(long where,
                                     Expression right,
                                     Expression index)
        constructor
    • Method Detail

      • checkAmbigName

        public Vset checkAmbigName​(Environment env,
                                   Context ctx,
                                   Vset vset,
                                   java.util.Hashtable<java.lang.Object,​java.lang.Object> exp,
                                   UnaryExpression loc)
        Description copied from class: Expression
        Check something that might be an AmbiguousName (refman 6.5.2). A string of dot-separated identifiers might be, in order of preference:
      • 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 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.
Overrides:
checkAmbigName in class Expression