|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object polyglot.ext.jl.types.TypeObject_c polyglot.ext.jl.types.Type_c polyglot.ext.jl.types.ReferenceType_c polyglot.ext.jl.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.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)
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()
|
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()
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. |
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 ArrayType
public ArrayType base(Type base)
base
in interface ArrayType
public Type ultimateBase()
ultimateBase
in interface ArrayType
public int dims()
ArrayType
dims
in interface ArrayType
public java.lang.String toString()
Type_c
toString
in interface Type
toString
in class Type_c
public java.lang.String translate(Resolver c)
translate
in interface Type
translate
in class Type_c
c
- 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 TypeObject
isCanonical
in class Type_c
public boolean isArray()
Type
isArray
in interface Type
isArray
in class Type_c
public ArrayType toArray()
Type_c
toArray
in interface Type
toArray
in class Type_c
public java.util.List methods()
methods
in interface ReferenceType
methods
in class ReferenceType_c
MethodInstance
.MethodInstance
public java.util.List fields()
fields
in interface ReferenceType
fields
in class ReferenceType_c
FieldInstance
.FieldInstance
public MethodInstance cloneMethod()
cloneMethod
in interface ArrayType
public FieldInstance fieldNamed(java.lang.String name)
fieldNamed
in interface ReferenceType
public FieldInstance lengthField()
lengthField
in interface ArrayType
public Type superType()
superType
in interface ReferenceType
superType
in class ReferenceType_c
public java.util.List interfaces()
interfaces
in interface ReferenceType
interfaces
in class ReferenceType_c
Type
.Type
public int hashCode()
hashCode
in class TypeObject_c
public boolean equalsImpl(TypeObject t)
TypeObject_c
equalsImpl
in interface TypeObject
equalsImpl
in class TypeObject_c
TypeObject_c.equalsImpl(TypeObject)
,
Object.hashCode()
public boolean isImplicitCastValidImpl(Type toType)
Type_c
toType
.
isImplicitCastValidImpl
in interface Type
isImplicitCastValidImpl
in class ReferenceType_c
public boolean isCastValidImpl(Type toType)
isCastValidImpl
in interface Type
isCastValidImpl
in class ReferenceType_c
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |