|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.mjc.CSpecializedType
This class represents a specialized type like
type1@type2.
| Field Summary | |
private CType |
dynamicType
|
static CSpecializedType[] |
EMPTY
|
private boolean |
isSpecialized
|
private CType |
staticType
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
CSpecializedType(CType type)
Constructs a type specification without an explicit specializer. |
|
CSpecializedType(CType staticType,
CType specializerType)
Constructs a specialized type specification. |
|
| Method Summary | |
void |
appendGenericSignature(FastStringBuffer buff)
|
void |
appendSignature(FastStringBuffer buff)
Transforms this type to a string |
boolean |
couldOverload(CSpecializedType other)
Checks whether a method with this specialized type in a parameter position could overload a method with other in the same position. |
CType |
dynamicType()
Return the dynamic type of this specialized type. |
static CType[] |
dynamicTypeTupleFrom(CSpecializedType[] specTypes)
Converts the given array of specialized types to an array of the dynamic types of arguments sent to formals with these specialized types. |
static CType[] |
dynamicTypeTupleFrom(CType recvType,
CSpecializedType[] specTypes)
Converts the given array of specialized types to an array of the dynamic types of arguments sent to formals with these specialized types. |
boolean |
equals(Object other)
|
boolean |
equals(Object other,
boolean enableUniv)
|
boolean |
equals(Object other,
CClassType[] args)
Checks whether this specialized type is made up of the same pair of types as a given specialized type. |
boolean |
equals(Object other,
CClassType[] args,
boolean enableUniv)
|
int |
getSize()
Returns the size used in stack by value of this type |
int |
hashCode()
Returns the hashcode for this. |
boolean |
isAlwaysAssignableTo(CSpecializedType dest,
CClassType[] args)
Is this type assignable to the given type by assignment type conversion [JLS2 5.2]. |
boolean |
isSpecialized()
|
boolean |
specializes(CSpecializedType other,
CClassType[] args)
Checks whether this specialized type is a specializing type for the given specialized type |
CType |
staticType()
Returns the static type part of this specialized type. |
static CType[] |
staticTypeTupleFrom(CType recvType,
CSpecializedType[] specTypes)
Converts the given array of specialized types to an array of the static type parts. |
String |
toString()
Transforms this type to a string |
String |
toVerboseString()
Transforms this type to a verbose string including universe annotations. |
static CType[] |
tupleOfSpecializersFrom(CSpecializedType[] specTypes)
Converts the given array of specialized types to an array of specializers. |
static CType[] |
tupleOfSpecializersFrom(CSpecializedType[] specTypes,
CClassType[] args)
|
CSpecializedType |
unspecializedType()
Returns an unspecialized type with the same static type as this. |
static CSpecializedType[] |
unspecializedTypeTupleFrom(CSpecializedType[] specTypes)
Converts the given array of specialized types to an array of unspecialized types. |
static CSpecializedType[] |
unspecializedTypeTupleFrom(CType[] simpleTypes)
|
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final CSpecializedType[] EMPTY
private CType staticType
private CType dynamicType
private boolean isSpecialized
| Constructor Detail |
public CSpecializedType(CType type)
public CSpecializedType(CType staticType,
CType specializerType)
staticType - the static type of the specification,
must not be nullspecializerType - the dynamic type of the specification,
must not be null | Method Detail |
public CType staticType()
public CType dynamicType()
public boolean equals(Object other,
CClassType[] args)
other - another specialized type to compare with
other
public boolean equals(Object other,
CClassType[] args,
boolean enableUniv)
public boolean equals(Object other,
boolean enableUniv)
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Object
public boolean specializes(CSpecializedType other,
CClassType[] args)
other - another specialized type to compare with
other public boolean couldOverload(CSpecializedType other)
other in the same position.
public boolean isSpecialized()
public String toString()
toString in class Objectpublic String toVerboseString()
public CSpecializedType unspecializedType()
public void appendSignature(FastStringBuffer buff)
appendSignature in interface CTypeSignatureAppenderpublic void appendGenericSignature(FastStringBuffer buff)
appendGenericSignature in interface CTypeSignatureAppenderpublic int getSize()
public boolean isAlwaysAssignableTo(CSpecializedType dest,
CClassType[] args)
dest - the destination type
public static CType[] tupleOfSpecializersFrom(CSpecializedType[] specTypes)
specTypes - the formal parameters
public static CType[] tupleOfSpecializersFrom(CSpecializedType[] specTypes,
CClassType[] args)
public static CType[] dynamicTypeTupleFrom(CSpecializedType[] specTypes)
specTypes - the formal parameters
public static CType[] dynamicTypeTupleFrom(CType recvType,
CSpecializedType[] specTypes)
recvType - the receiver type, or nullspecTypes - the formal parameters
public static CType[] staticTypeTupleFrom(CType recvType,
CSpecializedType[] specTypes)
recvType - the receiver type, or nullspecTypes - the formal parameters
public static CSpecializedType[] unspecializedTypeTupleFrom(CSpecializedType[] specTypes)
public static CSpecializedType[] unspecializedTypeTupleFrom(CType[] simpleTypes)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||