Class EclipseSourceType
java.lang.Object
org.aspectj.weaver.AbstractReferenceTypeDelegate
org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType
- All Implemented Interfaces:
ReferenceTypeDelegate
Supports viewing eclipse TypeDeclarations/SourceTypeBindings as a ResolvedType
- Author:
- Jim Hugunin, Andy Clement
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
static final short
protected ResolvedMember[]
protected ResolvedMember[]
protected ResolvedPointcutDefinition[]
Fields inherited from class org.aspectj.weaver.AbstractReferenceTypeDelegate
cachedGenericClassTypeSignature, exposedToWeaver, resolvedTypeX, UNKNOWN_SOURCE_FILE
-
Constructor Summary
ConstructorDescriptionEclipseSourceType
(ReferenceType resolvedTypeX, EclipseFactory factory, SourceTypeBinding binding, TypeDeclaration declaration, CompilationUnitDeclaration unit) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
convertEclipseAnnotation
(Annotation eclipseAnnotation, World w) Convert one eclipse annotation into an AnnotationX object containing an AnnotationAJ object.boolean
Designed to be overriden by EclipseType to disable collection of shadow mungers during pre-weave compilation phaseprotected EclipseFactory
protected void
WARNING: This method does not have a complete implementation.This method may not return all fields, for example it may not include the ajc$initFailureCause or ajc$perSingletonInstance fields - see bug 129613This method may not return all methods, for example it may not include clinit, aspectOf, hasAspect or ajc$postClinit methods - see bug 129613int
boolean
hasAnnotation
(UnresolvedType ofType) boolean
boolean
boolean
boolean
boolean
boolean
isAspect()
boolean
isEnum()
boolean
boolean
boolean
isNested()
toString()
Methods inherited from class org.aspectj.weaver.AbstractReferenceTypeDelegate
copySourceContext, ensureConsistent, getCompilerVersion, getFormalTypeParametersFromOuterClass, getGenericClassTypeSignature, getResolvedTypeX, getSourceContext, getSourcefilename, getSourceLocation, hasBeenWoven, isCacheable, isClass, isExposedToWeaver, isWeavable, setSourceContext, setSourcefilename
-
Field Details
-
declaredPointcuts
-
declaredMethods
-
declaredFields
-
declares
-
typeMungers
-
ACC_ANNOTATION
public static final short ACC_ANNOTATION- See Also:
-
ACC_ENUM
public static final short ACC_ENUM- See Also:
-
-
Constructor Details
-
EclipseSourceType
public EclipseSourceType(ReferenceType resolvedTypeX, EclipseFactory factory, SourceTypeBinding binding, TypeDeclaration declaration, CompilationUnitDeclaration unit)
-
-
Method Details
-
eclipseWorld
-
isAspect
public boolean isAspect() -
isAnonymous
public boolean isAnonymous() -
isNested
public boolean isNested()- Returns:
- true if this class is nested (this includes: member classes, local classes, anonymous classes)
-
getOuterClass
-
isAnnotationStyleAspect
public boolean isAnnotationStyleAspect()- Returns:
- true if the type is an annotation style aspect (a type marked @Aspect)
-
getWeaverState
-
getSuperclass
-
getDeclaredInterfaces
-
fillDeclaredMembers
protected void fillDeclaredMembers() -
getDeclaredFields
This method may not return all fields, for example it may not include the ajc$initFailureCause or ajc$perSingletonInstance fields - see bug 129613 -
getDeclaredMethods
This method may not return all methods, for example it may not include clinit, aspectOf, hasAspect or ajc$postClinit methods - see bug 129613 -
getDeclaredPointcuts
-
getModifiers
public int getModifiers() -
toString
-
checkPointcutDeclarations
public void checkPointcutDeclarations() -
isInterface
public boolean isInterface() -
isEnum
public boolean isEnum() -
isAnnotation
public boolean isAnnotation() -
isAnnotationWithRuntimeRetention
public boolean isAnnotationWithRuntimeRetention()- Returns:
- true if this annotation type has a retention policy of RUNTIME
-
getRetentionPolicy
-
canAnnotationTargetType
public boolean canAnnotationTargetType()- Returns:
- true if this annotation type can be on a regular type (ie. it doesn't specify anything or it specifies TYPE)
-
getAnnotationTargetKinds
- Returns:
- all the possible targets that this annotation can be placed upon
-
hasAnnotation
-
getAnnotations
WARNING: This method does not have a complete implementation. The aim is that it converts Eclipse annotation objects to the AspectJ form of annotations (the type AnnotationAJ). The AnnotationX objects returned are wrappers over either a Bcel annotation type or the AspectJ AnnotationAJ type. The minimal implementation provided here is for processing the RetentionPolicy and Target annotation types - these are the only ones which the weaver will attempt to process from an EclipseSourceType. More notes: The pipeline has required us to implement this. With the pipeline we can be weaving a type and asking questions of annotations before they have been turned into Bcel objects - ie. when they are still in EclipseSourceType form. Without the pipeline we would have converted everything to Bcel objects before proceeding with weaving. Because the pipeline won't start weaving until all aspects have been compiled and the fact that no AspectJ constructs match on the values within annotations, this code only needs to deal with converting system annotations that the weaver needs to process (RetentionPolicy, Target). -
hasAnnotations
public boolean hasAnnotations() -
convertEclipseAnnotation
Convert one eclipse annotation into an AnnotationX object containing an AnnotationAJ object. This code and the helper methods used by it will go *BANG* if they encounter anything not currently supported - this is safer than limping along with a malformed annotation. When the *BANG* is encountered the bug reporter should indicate the kind of annotation they were working with and this code can be enhanced to support it. -
getAnnotationTypes
-
getPerClause
- Returns:
- for an aspect declaration, return the
-
getDeclares
-
getPrivilegedAccesses
-
getTypeMungers
-
doesNotExposeShadowMungers
public boolean doesNotExposeShadowMungers()Description copied from class:AbstractReferenceTypeDelegate
Designed to be overriden by EclipseType to disable collection of shadow mungers during pre-weave compilation phase- Specified by:
doesNotExposeShadowMungers
in interfaceReferenceTypeDelegate
- Overrides:
doesNotExposeShadowMungers
in classAbstractReferenceTypeDelegate
-
getDeclaredGenericSignature
-
isGeneric
public boolean isGeneric() -
getTypeVariables
-