public abstract class ReferenceType_c extends Type_c implements ReferenceType
ReferenceType
represents a reference type --
a type on which contains methods and fields and is a subtype of
Object.position, ts
Modifier | Constructor and Description |
---|---|
protected |
ReferenceType_c() |
|
ReferenceType_c(TypeSystem ts) |
|
ReferenceType_c(TypeSystem ts,
Position pos) |
Modifier and Type | Method and Description |
---|---|
boolean |
descendsFromImpl(Type ancestor)
Return true if this type descends from
ancestor . |
abstract java.util.List<? extends FieldInstance> |
fields()
Returns a list of fields declared in this type.
|
boolean |
hasMethod(MethodInstance mi)
Return true if the type has the given method.
|
boolean |
hasMethodImpl(MethodInstance mi)
Return true if the type has the given method.
|
abstract java.util.List<? extends ReferenceType> |
interfaces()
Returns a list of all the type'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.
|
java.util.List<? extends MemberInstance> |
members()
Return a list of all the type's members.
|
abstract java.util.List<? extends MethodInstance> |
methods()
Returns a list of methods declared in this type.
|
java.util.List<? extends MethodInstance> |
methods(java.lang.String name,
java.util.List<? extends Type> argTypes)
Return the methods named
name with the given formal
parameter types, if any. |
java.util.List<? extends MethodInstance> |
methodsNamed(java.lang.String name)
Return the methods named
name , if any. |
abstract Type |
superType()
Returns the supertype of this type.
|
ReferenceType |
toReference()
Cast the type to a reference type, or null.
|
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, print, toArray, toClass, toNull, toPackage, toPrimitive, toString, toType, translate, typeEquals, typeEqualsImpl
copy, equals, equalsImpl, hashCode, position, typeSystem
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fieldNamed
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, print, toArray, toClass, toNull, toPrimitive, toString, translate, typeEquals, typeEqualsImpl
equalsImpl, isCanonical, position, typeSystem
protected ReferenceType_c()
public ReferenceType_c(TypeSystem ts)
public ReferenceType_c(TypeSystem ts, Position pos)
public boolean isReference()
Type
isReference
in interface Type
isReference
in class Type_c
public ReferenceType toReference()
Type
toReference
in interface Type
toReference
in class Type_c
isReference()
returns true.public java.util.List<? extends MemberInstance> members()
ReferenceType
members
in interface ReferenceType
MemberInstance
.MemberInstance
public abstract java.util.List<? extends MethodInstance> methods()
ReferenceType
methods
in interface ReferenceType
MethodInstance
.MethodInstance
public abstract java.util.List<? extends FieldInstance> fields()
ReferenceType
fields
in interface ReferenceType
FieldInstance
.FieldInstance
public abstract Type superType()
ReferenceType
superType
in interface ReferenceType
public abstract java.util.List<? extends ReferenceType> interfaces()
ReferenceType
interfaces
in interface ReferenceType
Type
.Type
public final boolean hasMethod(MethodInstance mi)
ReferenceType
hasMethod
in interface ReferenceType
public boolean hasMethodImpl(MethodInstance mi)
ReferenceType
hasMethodImpl
in interface ReferenceType
public boolean descendsFromImpl(Type ancestor)
Type
ancestor
.descendsFromImpl
in interface Type
descendsFromImpl
in class Type_c
public boolean isImplicitCastValidImpl(Type toType)
Type
toType
.isImplicitCastValidImpl
in interface Type
isImplicitCastValidImpl
in class Type_c
public java.util.List<? extends MethodInstance> 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<? extends MethodInstance> methods(java.lang.String name, java.util.List<? extends Type> 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