In my Spring 4 application, I have a class like this:
class Address {
public getAdress(){
...
List<Town> towns = getTowns();
...
}
@CustomAnnotation
private List<Town> getTowns(){
}
}
With AspectJ I can easily intercept the getAdress()
call.
The problem is with getTowns()
that is not intercepted.
There are solutions such as Load-Time Weaving but that is difficult to tune and I don't what to reconfigure my application.
How can I capture any call made to any method annotated with CustomAnnotation
without AspectJ ?
Regards
PS: I know that there is a workaround with self-reference but I don't find it very "clean".