|
|||||||||
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
public abstract class ReferenceType_c
A ReferenceType
represents a reference type --
a type on which contains methods and fields and is a subtype of
Object.
Field Summary |
---|
Fields inherited from class polyglot.ext.jl.types.TypeObject_c |
---|
position, ts |
Constructor Summary | |
---|---|
protected |
ReferenceType_c()
|
|
ReferenceType_c(TypeSystem ts)
|
|
ReferenceType_c(TypeSystem ts,
Position pos)
|
Method Summary | |
---|---|
boolean |
descendsFromImpl(Type ancestor)
Return true if this type descends from ancestor . |
abstract java.util.List |
fields()
Returns a list of FieldInstances for all the fields declared in this. |
boolean |
hasMethod(MethodInstance mi)
Return true if t has a method mi |
boolean |
hasMethodImpl(MethodInstance mi)
Return true if t has a method mi |
abstract java.util.List |
interfaces()
Returns a list of the types of this class's interfaces. |
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 . |
boolean |
isReference()
Return true if a reference type. |
abstract java.util.List |
methods()
Returns a list of MethodInstances for all the methods declared in this. |
java.util.List |
methods(java.lang.String name,
java.util.List argTypes)
Return the methods named name with the given formal
parameter types, if any. |
java.util.List |
methodsNamed(java.lang.String name)
Return the methods named name , if any. |
abstract Type |
superType()
Returns the supertype of this class. |
ReferenceType |
toReference()
Returns a non-null iff isReference() returns true. |
Methods inherited from class polyglot.ext.jl.types.Type_c |
---|
arrayOf, arrayOf, descendsFrom, isArray, isBoolean, isByte, isCanonical, 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, toArray, toClass, toNull, toPackage, toPrimitive, toString, toType, translate |
Methods inherited from class polyglot.ext.jl.types.TypeObject_c |
---|
copy, equals, equalsImpl, hashCode, position, typeSystem |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface polyglot.types.ReferenceType |
---|
fieldNamed |
Methods inherited from interface polyglot.types.Type |
---|
arrayOf, arrayOf, descendsFrom, isArray, isBoolean, isByte, isCastValid, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPrimitive, isShort, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toClass, toNull, toPrimitive, 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 |
Constructor Detail |
---|
protected ReferenceType_c()
public ReferenceType_c(TypeSystem ts)
public ReferenceType_c(TypeSystem ts, Position pos)
Method Detail |
---|
public boolean isReference()
Type
isReference
in interface Type
isReference
in class Type_c
public ReferenceType toReference()
Type_c
toReference
in interface Type
toReference
in class Type_c
public abstract java.util.List methods()
methods
in interface ReferenceType
MethodInstance
.MethodInstance
public abstract java.util.List fields()
fields
in interface ReferenceType
FieldInstance
.FieldInstance
public abstract Type superType()
superType
in interface ReferenceType
public abstract java.util.List interfaces()
interfaces
in interface ReferenceType
Type
.Type
public final boolean hasMethod(MethodInstance mi)
hasMethod
in interface ReferenceType
public boolean hasMethodImpl(MethodInstance mi)
hasMethodImpl
in interface ReferenceType
public boolean descendsFromImpl(Type ancestor)
Type_c
ancestor
.
descendsFromImpl
in interface Type
descendsFromImpl
in class Type_c
public boolean isImplicitCastValidImpl(Type toType)
Type_c
toType
.
isImplicitCastValidImpl
in interface Type
isImplicitCastValidImpl
in class Type_c
public java.util.List methodsNamed(java.lang.String name)
ReferenceType
name
, if any.
methodsNamed
in interface ReferenceType
name
- Name of the method to search for.
MethodInstance
.MethodInstance
public java.util.List methods(java.lang.String name, java.util.List argTypes)
ReferenceType
name
with the given formal
parameter types, if any.
methods
in interface ReferenceType
name
- Name of the method to search for.argTypes
- A list of Type
.
MethodInstance
.Type
,
MethodInstance
public boolean isCastValidImpl(Type toType)
isCastValidImpl
in interface Type
isCastValidImpl
in class Type_c
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |