I am trying to write an advice to intercept the calls to constructors of a class with my custom annotation:
@MyCustomAnnotation
public class SomeClass {
public SomeClass(Foo a, Bar b){
...
}
public SomeClass(Foo a){
this(a, null);
}
}
I see an example of how to intercept constructor calls, in general:
@Before("execution(*.new(..))")
How do I update this to only execute for classes that are annotated with my @MyCustomAnnotation
annotation