public class JL5SubstClassType_c extends SubstClassType_c<TypeVariable,ReferenceType> implements JL5SubstClassType
ClassType.Kind
base, constructors, fields, interfaces, memberClasses, methods, subst, substConstructors, substFields, substInterfaces, substMemberClasses, substMethods
decl, memberCache
position, ts
Constructor and Description |
---|
JL5SubstClassType_c(JL5TypeSystem ts,
Position pos,
JL5ParsedClassType base,
JL5Subst subst) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ReferenceType> |
actuals() |
AnnotationTypeElemInstance |
annotationElemNamed(java.lang.String name) |
java.util.List<AnnotationTypeElemInstance> |
annotationElems() |
Annotations |
annotations()
Annotations on the declaration of this type.
|
JL5ParsedClassType |
base()
The type on which substitutions are performed.
|
boolean |
descendsFromImpl(Type ancestor)
Return true if this type descends from
ancestor . |
EnumInstance |
enumConstantNamed(java.lang.String name) |
java.util.List<EnumInstance> |
enumConstants() |
PClass<TypeVariable,ReferenceType> |
instantiatedFrom() |
boolean |
isCastValidImpl(Type toType)
Requires: all type arguments are canonical.
|
boolean |
isEnclosedImpl(ClassType maybe_outer)
Implementation of
isEnclosed . |
java.util.LinkedList<Type> |
isImplicitCastValidChainImpl(Type toType)
Return a chain of types that show that this class can be implicitly cast
to toType.
|
boolean |
isImplicitCastValidImpl(Type toType)
Return true if a value of this type can be assigned to a variable of
type
toType . |
boolean |
isRawClass()
Is this class a Raw Class? See JLS 3rd ed., 4.8
|
ClassType |
outer()
The class's outer class, or null if a top-level class.
|
void |
print(CodeWriter w)
Pretty-print the name of this class to w.
|
void |
printParams(CodeWriter w)
Print just the params
|
java.util.Set<Type> |
superclasses()
All direct superclasses of the class.
|
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.
|
java.lang.String |
translateAsReceiver(Resolver c)
Translate the type as it should be if it were the receiver
of a field or method call.
|
constructors, deepCopy, entries, equalsImpl, fields, flags, fullName, hashCode, inStaticContext, interfaces, job, kind, memberClasses, methods, name, package_, setContainer, setFlags, subst, superType, typeEqualsImpl
container, copy, declaration, fieldNamed, hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isCanonical, isClass, isEnclosed, isInner, isInnerClass, isLocal, isMember, isNested, isThrowable, isTopLevel, isUncheckedException, memberClassNamed, members, resolver, setDeclaration, toClass
hasMethod, hasMethodImpl, isReference, methods, methodsNamed, toReference
arrayOf, arrayOf, descendsFrom, isArray, isBoolean, isByte, isCastValid, isChar, isComparable, isDouble, isFloat, isImplicitCastValid, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPackage, isPrimitive, isShort, isSubtype, isSubtypeImpl, isType, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toNull, toPackage, toPrimitive, toType, typeEquals
equals, position, typeSystem
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
constructors, fieldNamed, hasEnclosingInstance, hasEnclosingInstanceImpl, inStaticContext, isAnonymous, isEnclosed, isInner, isInnerClass, isLocal, isMember, isNested, isTopLevel, kind, memberClasses, memberClassNamed, resolver
package_
fields, hasMethod, hasMethodImpl, interfaces, members, methods, methods, methodsNamed, superType
arrayOf, arrayOf, descendsFrom, isArray, 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, toArray, toClass, toNull, toPrimitive, toReference, typeEquals, typeEqualsImpl
equalsImpl, isCanonical, position, typeSystem
container, flags, setContainer, setFlags
declaration, setDeclaration
public JL5SubstClassType_c(JL5TypeSystem ts, Position pos, JL5ParsedClassType base, JL5Subst subst)
public PClass<TypeVariable,ReferenceType> instantiatedFrom()
instantiatedFrom
in interface InstType<TypeVariable,ReferenceType>
public java.util.List<ReferenceType> actuals()
actuals
in interface InstType<TypeVariable,ReferenceType>
public EnumInstance enumConstantNamed(java.lang.String name)
enumConstantNamed
in interface JL5ClassType
public java.util.List<EnumInstance> enumConstants()
enumConstants
in interface JL5ClassType
public AnnotationTypeElemInstance annotationElemNamed(java.lang.String name)
annotationElemNamed
in interface JL5ClassType
public java.util.List<AnnotationTypeElemInstance> annotationElems()
annotationElems
in interface JL5ClassType
public void print(CodeWriter w)
print
in interface Type
print
in class ClassType_c
public void printParams(CodeWriter w)
JL5SubstClassType
printParams
in interface JL5SubstClassType
public java.lang.String toString()
Type
toString
in interface Type
toString
in class SubstClassType_c<TypeVariable,ReferenceType>
public boolean isRawClass()
JL5ClassType
isRawClass
in interface JL5ClassType
public boolean isCastValidImpl(Type toType)
ReferenceType_c
isCastValidImpl
in interface Type
isCastValidImpl
in class ClassType_c
public boolean isImplicitCastValidImpl(Type toType)
Type
toType
.isImplicitCastValidImpl
in interface Type
isImplicitCastValidImpl
in class ClassType_c
public java.util.LinkedList<Type> isImplicitCastValidChainImpl(Type toType)
JL5ClassType
isImplicitCastValidChainImpl
in interface JL5ClassType
public boolean descendsFromImpl(Type ancestor)
Type
ancestor
.descendsFromImpl
in interface Type
descendsFromImpl
in class ClassType_c
public JL5ParsedClassType base()
SubstType
base
in interface JL5SubstClassType
base
in interface SubstType<TypeVariable,ReferenceType>
base
in class SubstClassType_c<TypeVariable,ReferenceType>
public java.lang.String translate(Resolver c)
Type
translate
in interface Type
translate
in class SubstClassType_c<TypeVariable,ReferenceType>
c
- A resolver in which to lookup this type to determine if
the type is unique in the given resolver.public java.lang.String translateAsReceiver(Resolver c)
JL5ClassType
translateAsReceiver
in interface JL5ClassType
public ClassType outer()
ClassType
outer
in interface ClassType
outer
in class SubstClassType_c<TypeVariable,ReferenceType>
public boolean isEnclosedImpl(ClassType maybe_outer)
ClassType
isEnclosed
.
This method should only be called by the TypeSystem
or by a subclass.isEnclosedImpl
in interface ClassType
isEnclosedImpl
in class ClassType_c
public Annotations annotations()
JL5ClassType
annotations
in interface JL5ClassType
public java.util.Set<Type> superclasses()
JL5ClassType
superclasses
in interface JL5ClassType