The concrete aspect is generated annotation style aspect (so traditional Java constructs annotated with our AspectJ annotations). As it is built during aop.xml definitions registration we perform the type munging for perclause, ie. aspectOf() artifact directly, instead of waiting for it to go thru the weaver (that we are in the middle of configuring).
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | bytes
Bytecode for the generated class |
| private final Definition. | concreteAspect
Concrete aspect definition we build for |
| private static final String[] | |
| private boolean | isValid
Set to true when all is checks are verified |
| private ResolvedType | parent
The parent aspect, not concretized |
| private PerClause | perclause
Aspect perClause, used for direct munging of aspectOf artifacts |
| private final World | world
World for which we build for |
| Access | Constructor and Description |
|---|---|
| pack-priv | ConcreteAspectCodeGen(Definition.
the aspect definition concreteAspect,the related world (for type resolution, etc) world)Create a new generator for a concrete aspect |
| Modifier and Type | Method and Description |
|---|---|
| private AnnotationAJ | buildAdviceAnnotation(LazyClassGen cg, Definition.
For the given PointcutAndAdvice build the correct advice annotation. |
| private AnnotationGen | buildAnnotationFromString(ConstantPool cp, World w, String annotationString)
Build an AnnotationGen object based on a string, for example "@Foo(35,message='string')". |
| private AnnotationGen | |
| private AnnotationAJ | buildDeclareAnnotation_actualAnnotation(LazyClassGen cg, Definition.
Construct the annotation that the declare wants to add to the target. |
| private void | generateAdviceMethod(Definition.
The PointcutAndAdvice object encapsulates an advice kind, a pointcut and names a Java method in a particular class. |
| private void | generateDeclareAnnotation(Definition.
The DeclareAnnotation object encapsulates an method/field/type descriptor and an annotation. |
| public byte[] | |
| public String | |
| private Collection | |
| private void | |
| private boolean | |
| private void | |
| private String | Returns: string repr.Rebuild the XML snip that defines this concrete aspect, for log error purpose |
| public boolean |
| bytes | back to summary |
|---|---|
| private byte[] bytes Bytecode for the generated class | |
| concreteAspect | back to summary |
|---|---|
| private final Definition. Concrete aspect definition we build for | |
| EMPTY_STRINGS | back to summary |
|---|---|
| private static final String[] EMPTY_STRINGS | |
| isValid | back to summary |
|---|---|
| private boolean isValid Set to true when all is checks are verified | |
| parent | back to summary |
|---|---|
| private ResolvedType parent The parent aspect, not concretized | |
| perclause | back to summary |
|---|---|
| private PerClause perclause Aspect perClause, used for direct munging of aspectOf artifacts | |
| world | back to summary |
|---|---|
| private final World world World for which we build for | |
| ConcreteAspectCodeGen | back to summary |
|---|---|
| pack-priv ConcreteAspectCodeGen(Definition. Create a new generator for a concrete aspect
| |
| buildAdviceAnnotation | back to summary |
|---|---|
| private AnnotationAJ buildAdviceAnnotation(LazyClassGen cg, Definition. For the given PointcutAndAdvice build the correct advice annotation. | |
| buildAnnotationFromString | back to summary |
|---|---|
| private AnnotationGen buildAnnotationFromString(ConstantPool cp, World w, String annotationString) Build an AnnotationGen object based on a string, for example "@Foo(35,message='string')". Notice single quotes are fine for strings as they don't need special handling in the XML. | |
| buildBaseAnnotationType | back to summary |
|---|---|
| private AnnotationGen buildBaseAnnotationType(ConstantPool cp, World world, String typename) | |
| buildDeclareAnnotation_actualAnnotation | back to summary |
|---|---|
| private AnnotationAJ buildDeclareAnnotation_actualAnnotation(LazyClassGen cg, Definition. Construct the annotation that the declare wants to add to the target. | |
| generateAdviceMethod | back to summary |
|---|---|
| private void generateAdviceMethod(Definition. The PointcutAndAdvice object encapsulates an advice kind, a pointcut and names a Java method in a particular class. Generate an annotation style advice that has that pointcut whose implementation delegates to the Java method. | |
| generateDeclareAnnotation | back to summary |
|---|---|
| private void generateDeclareAnnotation(Definition. The DeclareAnnotation object encapsulates an method/field/type descriptor and an annotation. This uses a DeclareAnnotation object captured from the XML (something like '<declare-annotation field="* field1(..)" annotation="@Annot(a='a',fred=false,'abc')"/>') and builds the same construct that would have existed if the code style variant was used. This involves creating a member upon which to hang the real annotation and then creating a classfile level attribute indicating a declare annotation is present (that includes the signature pattern and a pointer to the real member holding the annotation). | |
| getBytes | back to summary |
|---|---|
public byte[] getBytes()
| |
| getClassName | back to summary |
|---|---|
| public String getClassName() | |
| getOutstandingAbstractMethods | back to summary |
|---|---|
| private Collection | |
| getOutstandingAbstractMethodsHelper | back to summary |
|---|---|
| private void getOutstandingAbstractMethodsHelper(ResolvedType type, Map<String, ResolvedMember> collector) | |
| hasPointcutAnnotation | back to summary |
|---|---|
| private boolean hasPointcutAnnotation(ResolvedMember member) | |
| reportError | back to summary |
|---|---|
| private void reportError(String message) Error reporting | |
| stringify | back to summary |
|---|---|
| private String stringify() Rebuild the XML snip that defines this concrete aspect, for log error purpose
| |
| validate | back to summary |
|---|---|
| public boolean validate() Checks that concrete aspect is valid.
| |