1 package polyglot.types; 2 3 /** 4 * An <code>ArrayType</code> represents an array of other types. 5 */ 6 public interface ArrayType extends ReferenceType 7 { 8 /** 9 * Base type of the array. 10 */ 11 Type base(); 12 13 /** 14 * Set the base type of the array, returning a new type. 15 */ 16 ArrayType base(Type base); 17 18 /** 19 * The ultimate base of the array. Guaranteed not to be an array type. 20 */ 21 Type ultimateBase(); 22 23 /** 24 * The array's length field. 25 */ 26 FieldInstance lengthField(); 27 28 /** 29 * The array's clone() method. 30 */ 31 MethodInstance cloneMethod(); 32 33 /** 34 * Return the number of dimensions in this array type. 35 * e.g., for A[], return 1; for A[][], return 2, etc. 36 */ 37 int dims(); 38 } 39