|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 |
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 |
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)
|
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 void checkDuplicates(ReferenceType newRt)
public java.lang.String getSignatureForAttribute()
getSignatureForAttribute
in class ResolvedType
public boolean isClass()
isClass
in class ResolvedType
public int getCompilerVersion()
ResolvedType
getCompilerVersion
in class ResolvedType
AjAttribute.WeaverVersionInfo
public boolean isGenericType()
isGenericType
in class UnresolvedType
public java.lang.String getGenericSignature()
public AnnotationAJ[] getAnnotations()
getAnnotations
in class ResolvedType
public void addAnnotation(AnnotationAJ annotationX)
addAnnotation
in class ResolvedType
public boolean hasAnnotation(UnresolvedType ofType)
public ResolvedType[] getAnnotationTypes()
getAnnotationTypes
in interface AnnotatedElement
getAnnotationTypes
in class ResolvedType
public java.lang.String getNameAsIdentifier()
getNameAsIdentifier
in class UnresolvedType
public AnnotationAJ getAnnotationOfType(UnresolvedType ofType)
getAnnotationOfType
in interface AnnotatedElement
getAnnotationOfType
in class ResolvedType
public boolean isAspect()
isAspect
in class ResolvedType
public boolean isAnnotationStyleAspect()
isAnnotationStyleAspect
in class ResolvedType
public boolean isEnum()
ResolvedType
isEnum
in class ResolvedType
public boolean isAnnotation()
ResolvedType
isAnnotation
in class ResolvedType
public boolean isAnonymous()
isAnonymous
in class ResolvedType
public boolean isNested()
isNested
in class ResolvedType
public ResolvedType getOuterClass()
public java.lang.String getRetentionPolicy()
public boolean isAnnotationWithRuntimeRetention()
ResolvedType
isAnnotationWithRuntimeRetention
in class ResolvedType
public boolean canAnnotationTargetType()
ResolvedType
canAnnotationTargetType
in class ResolvedType
public AnnotationTargetKind[] getAnnotationTargetKinds()
ResolvedType
getAnnotationTargetKinds
in class ResolvedType
public boolean isCoerceableFrom(ResolvedType o)
ResolvedType
This 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 ResolvedType
o
- the other type
public boolean isAssignableFrom(ResolvedType other)
ResolvedType
isAssignableFrom
in class ResolvedType
other
- the other type
public boolean isAssignableFrom(ResolvedType other, boolean allowMissing)
isAssignableFrom
in class ResolvedType
public ISourceContext getSourceContext()
getSourceContext
in class ResolvedType
public ISourceLocation getSourceLocation()
getSourceLocation
in class ResolvedType
public boolean isExposedToWeaver()
isExposedToWeaver
in class ResolvedType
public WeaverStateInfo getWeaverState()
getWeaverState
in class ResolvedType
public ResolvedMember[] getDeclaredFields()
getDeclaredFields
in class ResolvedType
public ResolvedType[] getDeclaredInterfaces()
getDeclaredInterfaces
in class ResolvedType
public ResolvedMember[] getDeclaredMethods()
getDeclaredMethods
in class ResolvedType
public ResolvedMember[] getDeclaredPointcuts()
getDeclaredPointcuts
in class ResolvedType
public TypeVariable[] getTypeVariables()
getTypeVariables
in class UnresolvedType
public PerClause getPerClause()
getPerClause
in class ResolvedType
public java.util.Collection<Declare> getDeclares()
getDeclares
in class ResolvedType
public java.util.Collection<ConcreteTypeMunger> getTypeMungers()
getTypeMungers
in class ResolvedType
public java.util.Collection<ResolvedMember> getPrivilegedAccesses()
getPrivilegedAccesses
in class ResolvedType
public int getModifiers()
getModifiers
in class ResolvedType
public ResolvedType getSuperclass()
getSuperclass
in class ResolvedType
public 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 ResolvedType
public java.lang.String getDeclaredGenericSignature()
public void setGenericType(ReferenceType rt)
public void demoteToSimpleType()
public ReferenceType getGenericType()
ResolvedType
getGenericType
in class ResolvedType
public void ensureConsistent()
ResolvedType
ensureConsistent
in class ResolvedType
public void addParent(ResolvedType newParent)
addParent
in class ResolvedType
public ReferenceType findDerivativeType(ResolvedType[] typeParameters)
typeParameters
- the type parameters to use when searching for the derivative type.
public boolean hasNewInterfaces()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |