Package org.aspectj.weaver
Class TypeVariable
java.lang.Object
org.aspectj.weaver.TypeVariable
Represents a type variable with possible bounds.
- Author:
- Adrian Colyer, Andy Clement
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
static final int
static final TypeVariable[]
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionTypeVariable
(String name) Constructor for an unbound type variable, eg.TypeVariable
(String name, UnresolvedType anUpperBound) TypeVariable
(String name, UnresolvedType anUpperBound, UnresolvedType[] superInterfaces) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canBeBoundTo
(ResolvedType candidate) answer true if the given type satisfies all of the bound constraints of this type variable.int
getName()
int
getRank()
Return complete signature, e.g.static TypeVariable
resolve all the bounds of this type variablevoid
setAdditionalInterfaceBounds
(UnresolvedType[] superInterfaces) void
void
setDeclaringElementKind
(int kind) void
setRank
(int rank) void
setSuperclass
(UnresolvedType superclass) void
setUpperBound
(UnresolvedType superclass) toString()
void
-
Field Details
-
NONE
-
UNKNOWN
public static final int UNKNOWN- See Also:
-
METHOD
public static final int METHOD- See Also:
-
TYPE
public static final int TYPE- See Also:
-
isResolved
public boolean isResolved
-
-
Constructor Details
-
TypeVariable
Constructor for an unbound type variable, eg. 'T' -
TypeVariable
-
TypeVariable
-
-
Method Details
-
getFirstBound
- Returns:
- the first bound, either the superclass or if non is specified the first interface or if non are specified then OBJECT
-
getUpperBound
-
getSuperInterfaces
-
getName
-
resolve
resolve all the bounds of this type variable -
canBeBoundTo
answer true if the given type satisfies all of the bound constraints of this type variable. If type variable has not been resolved then throws IllegalStateException -
setUpperBound
-
setAdditionalInterfaceBounds
-
toDebugString
-
getDisplayName
-
toString
-
getSignature
Return complete signature, e.g. "T extends Number" would return "T:Ljava/lang/Number;" note: MAY INCLUDE P types if bounds are parameterized types -
getSignatureForAttribute
- Returns:
- signature for inclusion in an attribute, there must be no 'P' in it signatures
-
setRank
public void setRank(int rank) -
getRank
public int getRank() -
setDeclaringElement
-
getDeclaringElement
-
setDeclaringElementKind
public void setDeclaringElementKind(int kind) -
getDeclaringElementKind
public int getDeclaringElementKind() -
write
- Throws:
IOException
-
read
- Throws:
IOException
-
getGenericSignature
-
getErasureSignature
-
getSuperclass
-
setSuperclass
-