Package org.aspectj.weaver
Class BoundedReferenceType
java.lang.Object
org.aspectj.weaver.UnresolvedType
org.aspectj.weaver.ResolvedType
org.aspectj.weaver.ReferenceType
org.aspectj.weaver.BoundedReferenceType
- All Implemented Interfaces:
AnnotatedElement
,Traceable
,TypeVariableDeclaringElement
A BoundedReferenceType is the result of a generics wildcard expression ? extends String, ? super Foo etc..
The "signature" for a bounded reference type follows the generic signature specification in section 4.4 of JVM spec: *,+,- plus
signature strings.
The bound may be a type variable (e.g. ? super T)
- Author:
- Adrian Colyer, Andy Clement
-
Nested Class Summary
Nested classes/interfaces inherited from class org.aspectj.weaver.UnresolvedType
UnresolvedType.TypeKind
-
Field Summary
Modifier and TypeFieldDescriptionprotected ReferenceType[]
static final int
int
static final int
static final int
Fields inherited from class org.aspectj.weaver.ReferenceType
EMPTY_ARRAY
Fields inherited from class org.aspectj.weaver.ResolvedType
bits, crosscuttingMembers, EMPTY_RESOLVED_TYPE_ARRAY, interTypeMungers, MISSING, NONE, PARAMETERIZED_TYPE_IDENTIFIER, temporaryAnnotationTypes, validBoxing, world
Fields inherited from class org.aspectj.weaver.UnresolvedType
AJC_PRIVILEGED, ANNOTATION, ARRAY_WITH_JUST_OBJECT, AT_INHERITED, AT_RETENTION, AT_TARGET, BOOLEAN, BYTE, CHAR, CLONEABLE, DOUBLE, ENUM, ERROR, FLOAT, INT, JAVA_LANG_ANNOTATION, JAVA_LANG_CLASS_ARRAY, JAVA_LANG_REFLECT_CONSTRUCTOR, JAVA_LANG_REFLECT_FIELD, JAVA_LANG_REFLECT_METHOD, JL_CLASS, JL_EXCEPTION, JL_STRING, JOINPOINT_ENCLOSINGSTATICPART, JOINPOINT_STATICPART, LONG, MISSING_NAME, OBJECT, OBJECTARRAY, PROCEEDING_JOINPOINT, RUNTIME_EXCEPTION, SERIALIZABLE, SHORT, signature, signatureErasure, SOMETHING, SUPPRESS_AJ_WARNINGS, THROWABLE, typeKind, typeParameters, typeVariables, VOID
-
Constructor Summary
ModifierConstructorDescriptionprotected
BoundedReferenceType
(String signature, String erasedSignature, World world) only for use when resolving GenericsWildcardTypeX or a TypeVariableReferenceTypeBoundedReferenceType
(ReferenceType aBound, boolean isExtends, World world) BoundedReferenceType
(ReferenceType aBound, boolean isExtends, World world, ReferenceType[] additionalInterfaces) BoundedReferenceType
(World world) Constructs the BoundedReferenceType representing an unbounded wildcard '?'. -
Method Summary
Modifier and TypeMethodDescriptionboolean
alwaysMatches
(ResolvedType aCandidateType) boolean
canBeCoercedTo
(ResolvedType aCandidateType) Find out from the generic signature the true signature of any interfaces I implement.boolean
boolean
boolean
boolean
isSuper()
boolean
parameterize
(Map<String, UnresolvedType> typeBindings) Iff I am a parameterized type, and any of my parameters are type variable references (or nested parameterized types), return a version with those type parameters replaced in accordance with the passed bindings.Methods inherited from class org.aspectj.weaver.ReferenceType
addAnnotation, addParent, canAnnotationTargetType, checkDuplicates, demoteToSimpleType, doesNotExposeShadowMungers, ensureConsistent, findDerivativeType, fromTypeX, getAnnotationOfType, getAnnotations, getAnnotationTargetKinds, getAnnotationTypes, getCompilerVersion, getDeclaredFields, getDeclaredGenericSignature, getDeclaredMethods, getDeclaredPointcuts, getDeclares, getDelegate, getEndPos, getGenericSignature, getGenericType, getModifiers, getNameAsIdentifier, getOuterClass, getPerClause, getPrivilegedAccesses, getRetentionPolicy, getSourceContext, getSourceLocation, getStartPos, getSuperclass, getTypeMungers, getTypeVariables, getWeaverState, hasAnnotation, hasAnnotations, hasNewInterfaces, isAnnotation, isAnnotationStyleAspect, isAnnotationWithRuntimeRetention, isAnonymous, isAspect, isAssignableFrom, isAssignableFrom, isClass, isCoerceableFrom, isEnum, isExposedToWeaver, isGenericType, isNested, setDelegate, setEndPos, setGenericType, setStartPos
Methods inherited from class org.aspectj.weaver.ResolvedType
addInterTypeMunger, ajMembersNeedParameterization, canBeSeenBy, checkInterTypeMungers, checkLegalOverride, clearInterTypeMungers, collectCrosscuttingMembers, collectDeclares, collectInterTypeMungers, conflictingSignature, conflictingSignature, discoverActualOccurrenceOfTypeInHierarchy, equals, fillInAnyTypeParameters, findPointcut, getAjMemberParameterizationMap, getBinaryPath, getDeclaredAdvice, getDeclaredJavaFields, getDeclaredJavaMethods, getDeclaredShadowMungers, getDeclaringType, getDirectSupertypes, getExposedPointcuts, getFields, getHierarchy, getHierarchy, getHierarchyWithoutIterator, getInterTypeMungers, getInterTypeMungersIncludingSupers, getInterTypeParentMungers, getInterTypeParentMungersIncludingSupers, getMemberParameterizationMap, getMethods, getMethodsIncludingIntertypeDeclarations, getMethodsWithoutIterator, getPointcuts, getRawType, getResolvedComponentType, getResolvedTypeParameters, getSize, getTopmostImplementor, getWorld, isAbstract, isCacheable, isCheckedException, isConvertableFrom, isException, isFinal, isGroovyObject, isInheritedAnnotation, isInterface, isMissing, isMissing, isMoreVisible, isParameterizedWithTypeVariable, isPrimitiveArray, isPrivilegedAspect, isSynthetic, isTopmostImplementor, isTypeHierarchyComplete, isVisible, lookupDirectlyDeclaredMemberNoSupers, lookupField, lookupMemberIncludingITDsOnInterfaces, lookupMemberNoSupers, lookupMemberWithSupersAndITDs, lookupMethod, lookupMethodInITDs, lookupResolvedMember, lookupSyntheticMember, makeArray, matches, needsNoConversionFrom, parameterizedWith, setBinaryPath, tagAsTypeHierarchyComplete
Methods inherited from class org.aspectj.weaver.UnresolvedType
add, forGenericType, forGenericTypeSignature, forGenericTypeVariables, forName, forNames, forPrimitiveType, forRawTypeName, forSignature, forSignatures, getBaseName, getClassName, getComponentType, getDimensions, getErasureSignature, getName, getNames, getOutermostType, getPackageName, getPackageNameAsIdentifier, getRawName, getSignature, getSimpleBaseName, getTypekind, getTypeParameters, getTypeVariableNamed, hashCode, insert, isArray, isParameterizedOrGenericType, isParameterizedOrRawType, isParameterizedType, isPrimitiveType, isRawType, isSimpleType, isTypeVariableReference, isVoid, makeArray, needsModifiableDelegate, read, readArray, resolve, setNeedsModifiableDelegate, toDebugString, toString, toTraceString, write, writeArray
-
Field Details
-
UNBOUND
public static final int UNBOUND- See Also:
-
EXTENDS
public static final int EXTENDS- See Also:
-
SUPER
public static final int SUPER- See Also:
-
kind
public int kind -
additionalInterfaceBounds
-
-
Constructor Details
-
BoundedReferenceType
-
BoundedReferenceType
public BoundedReferenceType(ReferenceType aBound, boolean isExtends, World world, ReferenceType[] additionalInterfaces) -
BoundedReferenceType
only for use when resolving GenericsWildcardTypeX or a TypeVariableReferenceType -
BoundedReferenceType
Constructs the BoundedReferenceType representing an unbounded wildcard '?'. In this situation the signature is '*' and the erased signature is Ljava/lang/Object;
-
-
Method Details
-
getUpperBound
-
getLowerBound
-
getAdditionalBounds
-
parameterize
Description copied from class:ResolvedType
Iff I am a parameterized type, and any of my parameters are type variable references (or nested parameterized types), return a version with those type parameters replaced in accordance with the passed bindings.- Overrides:
parameterize
in classResolvedType
-
getSignatureForAttribute
- Overrides:
getSignatureForAttribute
in classReferenceType
-
hasLowerBound
public boolean hasLowerBound() -
isExtends
public boolean isExtends() -
isSuper
public boolean isSuper() -
isUnbound
public boolean isUnbound() -
alwaysMatches
-
canBeCoercedTo
-
getSimpleName
- Overrides:
getSimpleName
in classUnresolvedType
-
getDeclaredInterfaces
Description copied from class:ReferenceType
Find out from the generic signature the true signature of any interfaces I implement. If I am parameterized, these may then need to be parameterized before returning.- Overrides:
getDeclaredInterfaces
in classReferenceType
-
isGenericWildcard
public boolean isGenericWildcard()- Overrides:
isGenericWildcard
in classUnresolvedType
-