|
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.CType
org.multijava.mjc.CClassType
org.multijava.mjc.CTypeVariable
org.multijava.mjc.CCaptureType
Type resulting from applying capture conversion (JLS3 5.1.10) to a wildcard.
This type is basically a normal CTypeVariable whose upper bounds
are a combination of the wildcard's optional bound and the bounds of the
formal type variable for which the wildcard is a type argument. Additionally,
a type variable resulting from capture conversion may have a lower bound
associated to it which is used for checking subtype relationships.
| Nested Class Summary |
| Nested classes inherited from class org.multijava.mjc.CType |
CType.MethodSignature, CType.MethodSignatureParser, CType.StringBuffers, CType.TupleCollection |
| Field Summary | |
private CClassType |
lowerBound
The lower bound of this capture type variable or null if the
lower bound is of type CNullType. |
| Fields inherited from class org.multijava.mjc.CTypeVariable |
EMPTY |
| Fields inherited from class org.multijava.mjc.CClassType |
arguments, EMPTY_ARG, index, universe |
| Fields inherited from class org.multijava.mjc.CType |
instance, isMethodTypeVariable, isTypeVariable, type |
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
private |
CCaptureType(String name,
CClassType[] upperBounds,
CClassType lowerBound)
Private constructor. |
| Method Summary | |
static CCaptureType |
create(CWildcardType wildcard)
Creates a capture type for the given wildcard which must
have been type checked. |
CClassType |
getLowerBound()
Returns the lower bound of this type variable or null if
the type variable has no lower bound. |
boolean |
isCapture()
Returns whether this is a wildcard capture type as resulting from capture conversion (JLS3 5.1.10). |
boolean |
isClassTypeVariable()
Returns whether this type is a type variable introduced by a generic class declaration (JLS3 8.1.2) or a generic interface declaration (JLS3 9.1.2) as opposed to a method type variable. |
boolean |
isMethodTypeVariable()
|
boolean |
isTypeVariable()
Check if a type is a type variable |
String |
toString()
Transforms this type to a string |
| Methods inherited from class org.multijava.mjc.CTypeVariable |
appendDefinitionSignature, appendGenericSignature, appendSignature, changesByErasure, checkType, equals, equals, getBounds, getIdent, getIndex, hashCode, hasSameBound, isAlwaysAssignableTo, isAlwaysAssignableTo, isAlwaysAssignableTo, isReifiableType, needsUncheckedConversion, setIndex, setMethodTypeVariable |
| 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 |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private CClassType lowerBound
null if the
lower bound is of type CNullType.
See JLS3 5.1.10 for details on what the lower bound of a wildcard capture type is.
| Constructor Detail |
private CCaptureType(String name,
CClassType[] upperBounds,
CClassType lowerBound)
name - The name of the wildcard capture type.upperBounds - The upper bounds of the wildcard capture type.lowerBound - The lower bound of the wildcard capture type or
null if it has no lower bound.| Method Detail |
public static CCaptureType create(CWildcardType wildcard)
wildcard which must
have been type checked.
The returned wildcard capture type is guaranteed to be type checked.
wildcard - The actual wildcard.
null.public CClassType getLowerBound()
null if
the type variable has no lower bound.
null if
the type variable has no lower bound.public boolean isTypeVariable()
CType
isTypeVariable in class CTypepublic boolean isClassTypeVariable()
CType
isClassTypeVariable in class CTypeVariablepublic boolean isMethodTypeVariable()
isMethodTypeVariable in class CTypeVariablepublic boolean isCapture()
CType
isCapture in class CTypepublic String toString()
CClassTypealso assignable loadedClassInfo, thisClassInfo; ensures \not_modified(loadedClassInfo);
toString in class CTypeVariable
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||