|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.weaver.UnresolvedType
org.aspectj.weaver.ResolvedType
org.aspectj.weaver.ReferenceType
public class ReferenceType
A reference type represents some 'real' type, not a primitive, not an array - but a real type, for example java.util.List. Each ReferenceType has a delegate that is the underlying artifact - either an eclipse artifact or a bcel artifact. If the type represents a raw type (i.e. there is a generic form) then the genericType field is set to point to the generic type. If it is for a parameterized type then the generic type is also set to point to the generic form.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.aspectj.weaver.UnresolvedType |
|---|
UnresolvedType.TypeKind |
| Field Summary | |
|---|---|
static ReferenceType[] |
EMPTY_ARRAY
|
| Fields inherited from class org.aspectj.weaver.ResolvedType |
|---|
crosscuttingMembers, EMPTY_RESOLVED_TYPE_ARRAY, interTypeMungers, MISSING, NONE, PARAMETERIZED_TYPE_IDENTIFIER, temporaryAnnotationTypes, validBoxing, world |
| Fields inherited from class org.aspectj.weaver.UnresolvedType |
|---|
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, RUNTIME_EXCEPTION, SERIALIZABLE, SHORT, signature, signatureErasure, SOMETHING, SUPPRESS_AJ_WARNINGS, THROWABLE, typeKind, typeParameters, typeVariables, VOID |
| Constructor Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
void |
addAnnotation(AnnotationAJ annotationX)
|
void |
addParent(ResolvedType newParent)
|
boolean |
canAnnotationTargetType()
Note: Only overridden by ReferenceType subtype |
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). |
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()
|
ResolvedType |
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 |
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ReferenceType[] EMPTY_ARRAY
| Constructor Detail |
|---|
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)
| Method Detail |
|---|
public static ReferenceType fromTypeX(UnresolvedType tx,
World world)
public java.lang.String getSignatureForAttribute()
getSignatureForAttribute in class ResolvedTypepublic boolean isClass()
isClass in class ResolvedTypepublic int getCompilerVersion()
ResolvedType
getCompilerVersion in class ResolvedTypeAjAttribute.WeaverVersionInfopublic boolean isGenericType()
isGenericType in class UnresolvedTypepublic java.lang.String getGenericSignature()
public AnnotationAJ[] getAnnotations()
getAnnotations 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()
ResolvedType
isEnum in class ResolvedTypepublic boolean isAnnotation()
ResolvedType
isAnnotation in class ResolvedTypepublic boolean isAnonymous()
isAnonymous in class ResolvedTypepublic boolean isNested()
isNested in class ResolvedTypepublic ResolvedType getOuterClass()
public java.lang.String getRetentionPolicy()
public boolean isAnnotationWithRuntimeRetention()
ResolvedType
isAnnotationWithRuntimeRetention in class ResolvedTypepublic boolean canAnnotationTargetType()
ResolvedType
canAnnotationTargetType in class ResolvedTypepublic AnnotationTargetKind[] getAnnotationTargetKinds()
ResolvedType
getAnnotationTargetKinds 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 type
public boolean isAssignableFrom(ResolvedType other)
ResolvedType
isAssignableFrom in class ResolvedTypeother - the other type
public 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 ResolvedType getGenericType()
ResolvedType
getGenericType in class ResolvedTypepublic void ensureConsistent()
ResolvedType
ensureConsistent in class ResolvedTypepublic void addParent(ResolvedType newParent)
addParent in class ResolvedType
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||