Have annotated Java class with several methods:
@CustomAnnotation
public class MyService {
public List<MyObject> getMyObjects(){
...
}
public SomeObject getSomeObject(){
...
}
}
I should to log field values of MyObject and SomeObject instances.
aspectj part,where MyService object got:
public void logg2(JoinPoint jp) {
Object target = jp.getTarget();
}
target is MyService class,that holds methods.
How to get values of instance fields for MyObject and SomeObject,that are returned from methods in MyService class in Runtime?
1 Answer