polyglot.types
Interface ArrayType

All Superinterfaces:
java.lang.Cloneable, Copy, Qualifier, ReferenceType, java.io.Serializable, Type, TypeObject
All Known Implementing Classes:
ArrayType_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

Type base()
Base type of the array.


base

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


ultimateBase

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


lengthField

FieldInstance lengthField()
The array's length field.


cloneMethod

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


dims

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