|
|||||||||
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.ClassType_c polyglot.ext.param.types.SubstClassType_c
public class SubstClassType_c
Implementation of a ClassType that performs substitutions using a map. Subclasses must define how the substititions are performed and how to cache substituted types.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface polyglot.types.ClassType |
---|
ClassType.Kind |
Field Summary | |
---|---|
protected ClassType |
base
The class type we are substituting into. |
protected Subst |
subst
Map from formal parameters (of type Param) to actuals. |
Fields inherited from class polyglot.ext.jl.types.TypeObject_c |
---|
position, ts |
Fields inherited from interface polyglot.types.ClassType |
---|
ANONYMOUS, LOCAL, MEMBER, TOP_LEVEL |
Constructor Summary | |
---|---|
SubstClassType_c(ParamTypeSystem ts,
Position pos,
ClassType base,
Subst subst)
|
Method Summary | |
---|---|
Type |
base()
Get the class on that we are performing substitutions. |
java.util.List |
constructors()
Get the class's constructors. |
java.util.Iterator |
entries()
Entries of the underlying substitution object. |
boolean |
equalsImpl(TypeObject t)
Type equality test. |
java.util.List |
fields()
Get the class's fields. |
Flags |
flags()
Get the class's flags. |
java.lang.String |
fullName()
Get the class's full name, if possible. |
int |
hashCode()
Hash code. |
boolean |
inStaticContext()
Get whether the class was declared in a static context |
java.util.List |
interfaces()
Get the class's interfaces. |
ClassType.Kind |
kind()
Get the class's kind: top-level, member, local, or anonymous. |
java.util.List |
memberClasses()
Get the class's member classes. |
java.util.List |
methods()
Get the class's methods. |
java.lang.String |
name()
Get the class's short name, if possible. |
ClassType |
outer()
Get the class's outer class, if a nested class. |
Package |
package_()
Get the class's package, if possible. |
Subst |
subst()
The substitution object. |
Type |
superType()
Get the class's super 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. |
Methods inherited from class polyglot.ext.jl.types.ClassType_c |
---|
container, descendsFromImpl, fieldNamed, hasEnclosingInstance, hasEnclosingInstanceImpl, isAnonymous, isCanonical, isCastValidImpl, isClass, isEnclosed, isEnclosedImpl, isImplicitCastValidImpl, isInner, isInnerClass, isLocal, isMember, isNested, isThrowable, isTopLevel, isUncheckedException, memberClassNamed, toClass |
Methods inherited from class polyglot.ext.jl.types.ReferenceType_c |
---|
hasMethod, hasMethodImpl, isReference, methods, methodsNamed, toReference |
Methods inherited from class polyglot.ext.jl.types.Type_c |
---|
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 |
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.Type |
---|
arrayOf, arrayOf, descendsFrom, descendsFromImpl, isArray, isBoolean, isByte, isCastValid, isCastValidImpl, 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, toArray, toClass, toNull, toPrimitive, toReference |
Methods inherited from interface polyglot.types.Qualifier |
---|
isPackage, isType, toPackage, toType |
Methods inherited from interface polyglot.types.TypeObject |
---|
isCanonical, position, typeSystem |
Methods inherited from interface polyglot.util.Copy |
---|
copy |
Methods inherited from interface polyglot.types.ReferenceType |
---|
hasMethod, hasMethodImpl, methods, methodsNamed |
Field Detail |
---|
protected ClassType base
protected Subst subst
Constructor Detail |
---|
public SubstClassType_c(ParamTypeSystem ts, Position pos, ClassType base, Subst subst)
Method Detail |
---|
public java.util.Iterator entries()
entries
in interface SubstType
Iterator
of Map.Entry
.public Type base()
base
in interface SubstType
public Subst subst()
subst
in interface SubstType
public Type superType()
superType
in interface ReferenceType
superType
in class ClassType_c
public java.util.List interfaces()
interfaces
in interface ReferenceType
interfaces
in class ClassType_c
Type
.Type
public java.util.List fields()
fields
in interface ReferenceType
fields
in class ClassType_c
FieldInstance
.FieldInstance
public java.util.List methods()
methods
in interface ReferenceType
methods
in class ClassType_c
MethodInstance
.MethodInstance
public java.util.List constructors()
constructors
in interface ClassType
constructors
in class ClassType_c
ConstructorInstance
public java.util.List memberClasses()
memberClasses
in interface ClassType
memberClasses
in class ClassType_c
ClassType
public ClassType outer()
outer
in interface ClassType
outer
in class ClassType_c
public ClassType.Kind kind()
kind
in interface ClassType
kind
in class ClassType_c
public boolean inStaticContext()
inStaticContext
in interface ClassType
public java.lang.String fullName()
fullName
in interface Named
fullName
in class ClassType_c
public java.lang.String name()
name
in interface Named
name
in class ClassType_c
public Package package_()
package_
in interface Importable
package_
in class ClassType_c
public Flags flags()
ClassType_c
flags
in interface MemberInstance
flags
in class ClassType_c
public java.lang.String translate(Resolver c)
Type_c
translate
in interface Type
translate
in class ClassType_c
c
- A resolver in which to lookup this type to determine if
the type is unique in the given resolver.public boolean equalsImpl(TypeObject t)
equalsImpl
in interface TypeObject
equalsImpl
in class TypeObject_c
TypeObject_c.equalsImpl(TypeObject)
,
Object.hashCode()
public int hashCode()
hashCode
in class TypeObject_c
public java.lang.String toString()
Type_c
toString
in interface Type
toString
in class ClassType_c
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |