|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpolyglot.types.TypeObject_c
polyglot.types.Type_c
polyglot.types.ReferenceType_c
polyglot.types.ArrayType_c
public class ArrayType_c
An ArrayType represents an array of base java types.
| Field Summary | |
|---|---|
protected Type |
base
|
protected java.util.List |
fields
|
protected java.util.List |
interfaces
|
protected java.util.List |
methods
|
| Fields inherited from class polyglot.types.TypeObject_c |
|---|
position, ts |
| Constructor Summary | |
|---|---|
protected |
ArrayType_c()
Used for deserializing types. |
|
ArrayType_c(TypeSystem ts,
Position pos,
Type base)
|
| Method Summary | |
|---|---|
Type |
base()
Get the base type of the array. |
ArrayType |
base(Type base)
Set the base type of the array. |
MethodInstance |
cloneMethod()
Get the clone() method. |
int |
dims()
Return the number of dimensions in this array type. |
boolean |
equalsImpl(TypeObject t)
Default implementation is pointer equality. |
FieldInstance |
fieldNamed(java.lang.String name)
Get a field of the type by name. |
java.util.List |
fields()
Get the fields of the array type. |
int |
hashCode()
|
protected void |
init()
|
java.util.List |
interfaces()
Get the interfaces implemented by the array type. |
boolean |
isArray()
Return true if an array type. |
boolean |
isCanonical()
Returns true iff the type is canonical. |
boolean |
isCastValidImpl(Type toType)
Requires: all type arguments are canonical. |
boolean |
isImplicitCastValidImpl(Type toType)
Return true if a value of this type can be assigned to a variable of type toType. |
FieldInstance |
lengthField()
Get the length field. |
java.util.List |
methods()
Get the methods implemented by the array type. |
void |
print(CodeWriter w)
|
Type |
superType()
Get the super type of the array type. |
ArrayType |
toArray()
Returns a non-null iff isArray() returns true. |
java.lang.String |
toString()
Yields a string representing this type. |
java.lang.String |
translate(Resolver c)
Translate the type. |
boolean |
typeEqualsImpl(Type t)
Return true if this type is equivalent to t. |
Type |
ultimateBase()
Get the ulitimate base type of the array. |
| Methods inherited from class polyglot.types.ReferenceType_c |
|---|
descendsFromImpl, hasMethod, hasMethodImpl, isReference, members, methods, methodsNamed, toReference |
| Methods inherited from class polyglot.types.Type_c |
|---|
arrayOf, arrayOf, descendsFrom, isBoolean, isByte, isCastValid, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPackage, isPrimitive, isShort, isSubtype, isSubtypeImpl, isThrowable, isType, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toClass, toNull, toPackage, toPrimitive, toType, typeEquals |
| Methods inherited from class polyglot.types.TypeObject_c |
|---|
copy, equals, position, typeSystem |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface polyglot.types.ReferenceType |
|---|
hasMethod, hasMethodImpl, members, methods, methodsNamed |
| Methods inherited from interface polyglot.types.Type |
|---|
arrayOf, arrayOf, descendsFrom, descendsFromImpl, isBoolean, isByte, isCastValid, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPrimitive, isReference, isShort, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toClass, toNull, toPrimitive, toReference, typeEquals |
| Methods inherited from interface polyglot.types.Qualifier |
|---|
isPackage, isType, toPackage, toType |
| Methods inherited from interface polyglot.types.TypeObject |
|---|
position, typeSystem |
| Methods inherited from interface polyglot.util.Copy |
|---|
copy |
| Field Detail |
|---|
protected Type base
protected java.util.List fields
protected java.util.List methods
protected java.util.List interfaces
| Constructor Detail |
|---|
protected ArrayType_c()
public ArrayType_c(TypeSystem ts,
Position pos,
Type base)
| Method Detail |
|---|
protected void init()
public Type base()
base in interface ArrayTypepublic ArrayType base(Type base)
base in interface ArrayTypepublic Type ultimateBase()
ultimateBase in interface ArrayTypepublic int dims()
ArrayType
dims in interface ArrayTypepublic java.lang.String toString()
Type_c
toString in interface TypetoString in class Type_cpublic void print(CodeWriter w)
print in interface Typeprint in class Type_cpublic java.lang.String translate(Resolver c)
translate in interface Typetranslate in class Type_cc - A resolver in which to lookup this type to determine if
the type is unique in the given resolver.public boolean isCanonical()
isCanonical in interface TypeObjectisCanonical in class Type_cpublic boolean isArray()
Type
isArray in interface TypeisArray in class Type_cpublic ArrayType toArray()
Type_c
toArray in interface TypetoArray in class Type_cpublic java.util.List methods()
methods in interface ReferenceTypemethods in class ReferenceType_cMethodInstance.MethodInstancepublic java.util.List fields()
fields in interface ReferenceTypefields in class ReferenceType_cFieldInstance.FieldInstancepublic MethodInstance cloneMethod()
cloneMethod in interface ArrayTypepublic FieldInstance fieldNamed(java.lang.String name)
fieldNamed in interface ReferenceTypepublic FieldInstance lengthField()
lengthField in interface ArrayTypepublic Type superType()
superType in interface ReferenceTypesuperType in class ReferenceType_cpublic java.util.List interfaces()
interfaces in interface ReferenceTypeinterfaces in class ReferenceType_cType.Typepublic int hashCode()
hashCode in class TypeObject_cpublic boolean equalsImpl(TypeObject t)
TypeObject_c
equalsImpl in interface TypeObjectequalsImpl in class TypeObject_cTypeObject_c.equalsImpl(TypeObject),
Object.hashCode()public boolean typeEqualsImpl(Type t)
Type
typeEqualsImpl in interface TypetypeEqualsImpl in class Type_ct - Type to compare to
public boolean isImplicitCastValidImpl(Type toType)
Type_ctoType.
isImplicitCastValidImpl in interface TypeisImplicitCastValidImpl in class ReferenceType_cpublic boolean isCastValidImpl(Type toType)
isCastValidImpl in interface TypeisCastValidImpl in class ReferenceType_c
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||