|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpolyglot.ext.jl.types.TypeObject_c
polyglot.ext.jl.types.Type_c
polyglot.ext.jl.types.ReferenceType_c
polyglot.ext.jl.types.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.ext.jl.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)
Return true iff this type object is the same as t. |
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()
|
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. |
Type |
superType()
Get the super type of the array type. |
ArrayType |
toArray()
Cast the type to an array type, or null. |
java.lang.String |
toString()
Yields a string representing this type. |
java.lang.String |
translate(Resolver c)
Translate the type. |
Type |
ultimateBase()
Get the ulitimate base type of the array. |
| Methods inherited from class polyglot.ext.jl.types.ReferenceType_c |
descendsFromImpl, hasMethod, hasMethodImpl, isReference, methods, methodsNamed, toReference |
| Methods inherited from class polyglot.ext.jl.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 |
| Methods inherited from class polyglot.ext.jl.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, 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 |
| 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 |
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
toString in interface TypetoString 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
toArray in interface TypetoArray in class Type_cpublic java.util.List methods()
methods in interface ReferenceTypemethods in class ReferenceType_cpublic java.util.List fields()
fields in interface ReferenceTypefields in class ReferenceType_cpublic 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_cpublic int hashCode()
public boolean equalsImpl(TypeObject t)
TypeObjectt.
All Polyglot extensions should attempt to maintain pointer
equality between TypeObjects. If this cannot be done,
extensions can override TypeObject_c.equalsImpl(), and
don't forget to override hashCode().
equalsImpl in interface TypeObjectequalsImpl in class TypeObject_cpublic boolean isImplicitCastValidImpl(Type toType)
TypetoType.
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 | |||||||||