public class WildCardType_c extends ReferenceType_c implements WildCardType
position, ts
Constructor and Description |
---|
WildCardType_c(TypeSystem ts,
Position position,
ReferenceType upperBound,
ReferenceType lowerBound) |
Modifier and Type | Method and Description |
---|---|
boolean |
descendsFromImpl(Type ancestor)
Return true if this type descends from
ancestor . |
boolean |
equalsImpl(TypeObject t)
Default implementation is pointer equality.
|
FieldInstance |
fieldNamed(java.lang.String name)
Return the field named
name , or null. |
java.util.List<? extends FieldInstance> |
fields()
Returns a list of fields declared in this type.
|
int |
hashCode() |
boolean |
hasLowerBound() |
java.util.List<? extends ReferenceType> |
interfaces()
Returns a list of all the type's interfaces.
|
boolean |
isCanonical()
Return true if the type object contains no unknown/ambiguous types.
|
boolean |
isCastValidImpl(Type toType)
Requires: all type arguments are canonical.
|
boolean |
isExtendsConstraint() |
boolean |
isSuperConstraint() |
ReferenceType |
lowerBound() |
WildCardType |
lowerBound(ReferenceType newLowerBound) |
java.util.List<? extends MethodInstance> |
methods()
Returns a list of methods declared in this type.
|
Type |
superType()
Returns the supertype of this type.
|
java.lang.String |
toString()
Yields a string representing this type.
|
java.lang.String |
translate(Resolver c)
Return a string into which to translate the type.
|
boolean |
typeEqualsImpl(Type t)
Return true if this type is equivalent to t.
|
ReferenceType |
upperBound() |
WildCardType |
upperBound(ReferenceType newUpperBound) |
hasMethod, hasMethodImpl, isImplicitCastValidImpl, isReference, members, methods, methodsNamed, toReference
arrayOf, arrayOf, descendsFrom, isArray, 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, print, toArray, toClass, toNull, toPackage, toPrimitive, toType, typeEquals
copy, equals, position, typeSystem
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
hasMethod, hasMethodImpl, members, methods, methodsNamed
arrayOf, arrayOf, descendsFrom, isArray, isBoolean, isByte, isCastValid, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isImplicitCastValidImpl, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPrimitive, isReference, isShort, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, print, toArray, toClass, toNull, toPrimitive, toReference, typeEquals
position, typeSystem
public WildCardType_c(TypeSystem ts, Position position, ReferenceType upperBound, ReferenceType lowerBound)
public FieldInstance fieldNamed(java.lang.String name)
ReferenceType
name
, or null.fieldNamed
in interface ReferenceType
public boolean isCanonical()
TypeObject
isCanonical
in interface TypeObject
isCanonical
in class Type_c
public ReferenceType upperBound()
upperBound
in interface WildCardType
public WildCardType upperBound(ReferenceType newUpperBound)
upperBound
in interface WildCardType
public WildCardType lowerBound(ReferenceType newLowerBound)
lowerBound
in interface WildCardType
public ReferenceType lowerBound()
lowerBound
in interface WildCardType
public java.util.List<? extends MethodInstance> methods()
ReferenceType
methods
in interface ReferenceType
methods
in class ReferenceType_c
MethodInstance
.MethodInstance
public java.util.List<? extends FieldInstance> fields()
ReferenceType
fields
in interface ReferenceType
fields
in class ReferenceType_c
FieldInstance
.FieldInstance
public Type superType()
ReferenceType
superType
in interface ReferenceType
superType
in class ReferenceType_c
public java.util.List<? extends ReferenceType> interfaces()
ReferenceType
interfaces
in interface ReferenceType
interfaces
in class ReferenceType_c
Type
.Type
public java.lang.String translate(Resolver c)
Type
public java.lang.String toString()
Type
public boolean equalsImpl(TypeObject t)
TypeObject_c
equalsImpl
in interface TypeObject
equalsImpl
in class TypeObject_c
TypeObject_c.equalsImpl(TypeObject)
,
Object.hashCode()
public boolean typeEqualsImpl(Type t)
Type
typeEqualsImpl
in interface Type
typeEqualsImpl
in class Type_c
t
- Type to compare topublic int hashCode()
hashCode
in class TypeObject_c
public boolean isExtendsConstraint()
isExtendsConstraint
in interface WildCardType
public boolean isSuperConstraint()
isSuperConstraint
in interface WildCardType
public boolean hasLowerBound()
hasLowerBound
in interface WildCardType
public boolean descendsFromImpl(Type ancestor)
Type
ancestor
.descendsFromImpl
in interface Type
descendsFromImpl
in class ReferenceType_c
public boolean isCastValidImpl(Type toType)
ReferenceType_c
isCastValidImpl
in interface Type
isCastValidImpl
in class ReferenceType_c