public class ReferenceType extends ResolvedType
UnresolvedType.TypeKind| Modifier and Type | Field and Description |
|---|---|
static ReferenceType[] |
EMPTY_ARRAY |
bits, crosscuttingMembers, EMPTY_RESOLVED_TYPE_ARRAY, interTypeMungers, MISSING, NONE, PARAMETERIZED_TYPE_IDENTIFIER, temporaryAnnotationTypes, validBoxing, worldANNOTATION, 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, RUNTIME_EXCEPTION, SERIALIZABLE, SHORT, signature, signatureErasure, SOMETHING, SUPPRESS_AJ_WARNINGS, THROWABLE, typeKind, typeParameters, typeVariables, VOID| Constructor and Description |
|---|
ReferenceType(ResolvedType theGenericType,
ResolvedType[] theParameters,
World aWorld)
Constructor used when creating a parameterized type.
|
ReferenceType(java.lang.String signature,
java.lang.String signatureErasure,
World world) |
ReferenceType(java.lang.String signature,
World world) |
ReferenceType(UnresolvedType genericType,
World world)
Create a reference type for a generic type
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotation(AnnotationAJ annotationX) |
void |
addParent(ResolvedType newParent) |
boolean |
canAnnotationTargetType()
Note: Only overridden by ReferenceType subtype
|
void |
checkDuplicates(ReferenceType newRt) |
void |
demoteToSimpleType() |
boolean |
doesNotExposeShadowMungers() |
void |
ensureConsistent()
Undo any temporary modifications to the type (for example it may be holding annotations temporarily whilst some matching is
occurring - These annotations will be added properly during weaving but sometimes for type completion they need to be held
here for a while).
|
ReferenceType |
findDerivativeType(ResolvedType[] typeParameters)
Look for a derivative type with the specified type parameters.
|
static ReferenceType |
fromTypeX(UnresolvedType tx,
World world) |
AnnotationAJ |
getAnnotationOfType(UnresolvedType ofType) |
AnnotationAJ[] |
getAnnotations() |
AnnotationTargetKind[] |
getAnnotationTargetKinds()
Note: Only overridden by ReferenceType subtype
|
ResolvedType[] |
getAnnotationTypes() |
int |
getCompilerVersion()
return the weaver version used to build this type - defaults to the most recent version unless discovered otherwise.
|
ResolvedMember[] |
getDeclaredFields() |
java.lang.String |
getDeclaredGenericSignature() |
ResolvedType[] |
getDeclaredInterfaces()
Find out from the generic signature the true signature of any interfaces
I implement.
|
ResolvedMember[] |
getDeclaredMethods() |
ResolvedMember[] |
getDeclaredPointcuts() |
java.util.Collection<Declare> |
getDeclares() |
ReferenceTypeDelegate |
getDelegate() |
int |
getEndPos() |
java.lang.String |
getGenericSignature() |
ReferenceType |
getGenericType()
Overridden by ReferenceType to return a sensible answer for parameterized and raw types.
|
int |
getModifiers() |
java.lang.String |
getNameAsIdentifier() |
ResolvedType |
getOuterClass() |
PerClause |
getPerClause() |
java.util.Collection<ResolvedMember> |
getPrivilegedAccesses() |
java.lang.String |
getRetentionPolicy() |
java.lang.String |
getSignatureForAttribute() |
ISourceContext |
getSourceContext() |
ISourceLocation |
getSourceLocation() |
int |
getStartPos() |
ResolvedType |
getSuperclass() |
java.util.Collection<ConcreteTypeMunger> |
getTypeMungers() |
TypeVariable[] |
getTypeVariables() |
WeaverStateInfo |
getWeaverState() |
boolean |
hasAnnotation(UnresolvedType ofType) |
boolean |
hasAnnotations() |
boolean |
hasNewInterfaces() |
boolean |
isAnnotation()
Note: Only overridden by Name subtype.
|
boolean |
isAnnotationStyleAspect() |
boolean |
isAnnotationWithRuntimeRetention()
Note: Only overridden by Name subtype.
|
boolean |
isAnonymous() |
boolean |
isAspect() |
boolean |
isAssignableFrom(ResolvedType other)
Determines if the variables of this type could be assigned values of another type without casting.
|
boolean |
isAssignableFrom(ResolvedType other,
boolean allowMissing) |
boolean |
isClass() |
boolean |
isCoerceableFrom(ResolvedType o)
Determines if values of another type could possibly be cast to this type.
|
boolean |
isEnum()
Note: Only overridden by Name subtype.
|
boolean |
isExposedToWeaver() |
boolean |
isGenericType() |
boolean |
isNested() |
void |
setDelegate(ReferenceTypeDelegate delegate) |
void |
setEndPos(int endPos) |
void |
setGenericType(ReferenceType rt) |
void |
setStartPos(int startPos) |
addInterTypeMunger, ajMembersNeedParameterization, 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, isSynthetic, isTopmostImplementor, isTypeHierarchyComplete, isVisible, lookupDirectlyDeclaredMemberNoSupers, lookupField, lookupMemberIncludingITDsOnInterfaces, lookupMemberNoSupers, lookupMemberWithSupersAndITDs, lookupMethod, lookupMethodInITDs, lookupResolvedMember, lookupSyntheticMember, makeArray, matches, needsNoConversionFrom, parameterize, parameterizedWith, setBinaryPath, tagAsTypeHierarchyCompleteadd, forGenericType, forGenericTypeSignature, forGenericTypeVariables, forName, forNames, forPrimitiveType, forRawTypeName, forSignature, forSignatures, getBaseName, getClassName, getComponentType, getErasureSignature, getName, getNames, getOutermostType, getPackageName, getPackageNameAsIdentifier, getRawName, getSignature, getSimpleBaseName, getSimpleName, getTypekind, getTypeParameters, getTypeVariableNamed, hashCode, insert, isArray, isGenericWildcard, isParameterizedOrGenericType, isParameterizedOrRawType, isParameterizedType, isPrimitiveType, isRawType, isSimpleType, isTypeVariableReference, isVoid, makeArray, needsModifiableDelegate, read, readArray, resolve, setNeedsModifiableDelegate, toDebugString, toString, toTraceString, write, writeArraypublic static final ReferenceType[] EMPTY_ARRAY
public ReferenceType(java.lang.String signature,
World world)
public ReferenceType(java.lang.String signature,
java.lang.String signatureErasure,
World world)
public ReferenceType(ResolvedType theGenericType, ResolvedType[] theParameters, World aWorld)
public ReferenceType(UnresolvedType genericType, World world)
public static ReferenceType fromTypeX(UnresolvedType tx, World world)
public void checkDuplicates(ReferenceType newRt)
public java.lang.String getSignatureForAttribute()
getSignatureForAttribute in class ResolvedTypepublic boolean isClass()
isClass in class ResolvedTypepublic int getCompilerVersion()
ResolvedTypegetCompilerVersion in class ResolvedTypeAjAttribute.WeaverVersionInfopublic boolean isGenericType()
isGenericType in class UnresolvedTypepublic java.lang.String getGenericSignature()
public AnnotationAJ[] getAnnotations()
getAnnotations in class ResolvedTypepublic boolean hasAnnotations()
hasAnnotations in class ResolvedTypepublic void addAnnotation(AnnotationAJ annotationX)
addAnnotation in class ResolvedTypepublic boolean hasAnnotation(UnresolvedType ofType)
public ResolvedType[] getAnnotationTypes()
getAnnotationTypes in interface AnnotatedElementgetAnnotationTypes in class ResolvedTypepublic java.lang.String getNameAsIdentifier()
getNameAsIdentifier in class UnresolvedTypepublic AnnotationAJ getAnnotationOfType(UnresolvedType ofType)
getAnnotationOfType in interface AnnotatedElementgetAnnotationOfType in class ResolvedTypepublic boolean isAspect()
isAspect in class ResolvedTypepublic boolean isAnnotationStyleAspect()
isAnnotationStyleAspect in class ResolvedTypepublic boolean isEnum()
ResolvedTypeisEnum in class ResolvedTypepublic boolean isAnnotation()
ResolvedTypeisAnnotation in class ResolvedTypepublic boolean isAnonymous()
isAnonymous in class ResolvedTypepublic boolean isNested()
isNested in class ResolvedTypepublic ResolvedType getOuterClass()
getOuterClass in class ResolvedTypepublic java.lang.String getRetentionPolicy()
public boolean isAnnotationWithRuntimeRetention()
ResolvedTypeisAnnotationWithRuntimeRetention in class ResolvedTypepublic boolean canAnnotationTargetType()
ResolvedTypecanAnnotationTargetType in class ResolvedTypepublic AnnotationTargetKind[] getAnnotationTargetKinds()
ResolvedTypegetAnnotationTargetKinds in class ResolvedTypepublic boolean isCoerceableFrom(ResolvedType o)
ResolvedTypeThis method should be commutative, i.e., for all UnresolvedType a, b and all World w:
a.isCoerceableFrom(b, w) == b.isCoerceableFrom(a, w)
isCoerceableFrom in class ResolvedTypeo - the other typepublic boolean isAssignableFrom(ResolvedType other)
ResolvedTypeisAssignableFrom in class ResolvedTypeother - the other typepublic boolean isAssignableFrom(ResolvedType other, boolean allowMissing)
isAssignableFrom in class ResolvedTypepublic ISourceContext getSourceContext()
getSourceContext in class ResolvedTypepublic ISourceLocation getSourceLocation()
getSourceLocation in class ResolvedTypepublic boolean isExposedToWeaver()
isExposedToWeaver in class ResolvedTypepublic WeaverStateInfo getWeaverState()
getWeaverState in class ResolvedTypepublic ResolvedMember[] getDeclaredFields()
getDeclaredFields in class ResolvedTypepublic ResolvedType[] getDeclaredInterfaces()
getDeclaredInterfaces in class ResolvedTypepublic ResolvedMember[] getDeclaredMethods()
getDeclaredMethods in class ResolvedTypepublic ResolvedMember[] getDeclaredPointcuts()
getDeclaredPointcuts in class ResolvedTypepublic TypeVariable[] getTypeVariables()
getTypeVariables in class UnresolvedTypepublic PerClause getPerClause()
getPerClause in class ResolvedTypepublic java.util.Collection<Declare> getDeclares()
getDeclares in class ResolvedTypepublic java.util.Collection<ConcreteTypeMunger> getTypeMungers()
getTypeMungers in class ResolvedTypepublic java.util.Collection<ResolvedMember> getPrivilegedAccesses()
getPrivilegedAccesses in class ResolvedTypepublic int getModifiers()
getModifiers in class ResolvedTypepublic ResolvedType getSuperclass()
getSuperclass in class ResolvedTypepublic ReferenceTypeDelegate getDelegate()
public void setDelegate(ReferenceTypeDelegate delegate)
public int getEndPos()
public int getStartPos()
public void setEndPos(int endPos)
public void setStartPos(int startPos)
public boolean doesNotExposeShadowMungers()
doesNotExposeShadowMungers in class ResolvedTypepublic java.lang.String getDeclaredGenericSignature()
public void setGenericType(ReferenceType rt)
public void demoteToSimpleType()
public ReferenceType getGenericType()
ResolvedTypegetGenericType in class ResolvedTypepublic void ensureConsistent()
ResolvedTypeensureConsistent in class ResolvedTypepublic void addParent(ResolvedType newParent)
addParent in class ResolvedTypepublic ReferenceType findDerivativeType(ResolvedType[] typeParameters)
typeParameters - the type parameters to use when searching for the derivative
type.public boolean hasNewInterfaces()