polyglot.types
Interface ArrayType

All Superinterfaces:
java.lang.Cloneable, Copy, Qualifier, ReferenceType, java.io.Serializable, Type, TypeObject
All Known Subinterfaces:
ConstArrayType
All Known Implementing Classes:
ArrayType_c, ConstArrayType_c

public interface ArrayType
extends ReferenceType

An ArrayType represents an array of other types.


Method Summary
 Type base()
          Base type of the array.
 ArrayType base(Type base)
          Set the base type of the array, returning a new type.
 MethodInstance cloneMethod()
          The array's clone() method.
 int dims()
          Return the number of dimensions in this array type.
 FieldInstance lengthField()
          The array's length field.
 Type ultimateBase()
          The ultimate base of the array.
 
Methods inherited from interface polyglot.types.ReferenceType
fieldNamed, fields, hasMethod, hasMethodImpl, interfaces, methods, methods, methodsNamed, superType
 
Methods inherited from interface polyglot.types.Type
arrayOf, arrayOf, descendsFrom, descendsFromImpl, isArray, isBoolean, isByte, isCastValid, isCastValidImpl, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isImplicitCastValidImpl, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPrimitive, isReference, isShort, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toClass, toNull, toPrimitive, toReference, toString, translate
 
Methods inherited from interface polyglot.types.Qualifier
isPackage, isType, toPackage, toType
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, isCanonical, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

base

public Type base()
Base type of the array.


base

public ArrayType base(Type base)
Set the base type of the array, returning a new type.


ultimateBase

public Type ultimateBase()
The ultimate base of the array. Guaranteed not to be an array type.


lengthField

public FieldInstance lengthField()
The array's length field.


cloneMethod

public MethodInstance cloneMethod()
The array's clone() method.


dims

public int dims()
Return the number of dimensions in this array type. e.g., for A[], return 1; for A[][], return 2, etc.