Spring AOP Introductions On CustomAnnotated Classes [message #1795860] |
Mon, 01 October 2018 08:55 |
Eclipse User |
|
|
|
Hi,
We are trying to identify Custom annotated Classes in @DeclareParents usages for the value.
Example:
Custom Annotation declared like below
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface CustomAnnot{
}
And usage of this one of the class.
@CustomAnnot
public class TestClass {
private int a;
private int b;
}
Now trying to create an aspect and identify classes annotated with @customAnnot and apply default implementation of interface "AddNewField".
@Aspect
public class introductionAspect {
@DeclareParents(value="@CustomAnnot *", defaultImpl=DefaultAddNewFieldImpl.class)
public static AddNewField mixin;
}
But my aspect not able to identify "TestClass" yet all to apply DefaultAddNewFieldImpl on it.
Can any one suggest me or provide inputs exactly how to identify custom annotated classes in @Aspect annotation style?
|
|
|
Powered by
FUDForum. Page generated in 0.33829 seconds