Announcement Announcement Module
Collapse
No announcement yet.
Runtime AOP Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Runtime AOP

    Hello,

    My scenario is as follows:

    I would like to know what methods of object (and nested objects) are invoked. For example:

    Code:
    class A {
      B b;
      // getters & setters
    }
    
    
    class B {
      String name;
      // getters & setters
    }
    if somebody does:

    Code:
    A a = new A();
    // X
    a.getB().getName();
    I would like to get chain of invocations starting from a (for example t construct a message such as: "b.name"). The simple solution is to add "something" in line X which gets object and intercept all getters for the object.

    Is it possible to do it using Spring AOP easily or maybe other AOP library? This is only functionality I need, so the lib doesn't have to share thousands of functionalities.

    Thanks for answers.
Working...
X