Announcement Announcement Module
Collapse
No announcement yet.
access to target object of the methodInvocation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • access to target object of the methodInvocation

    Hi

    I have a name match method interceptor for a class TestClass for the method TestMethodOne.

    In the interceptor based on a decision, i would like to call TestMethodTwo of the same class.

    But i don't have access to the target object of the methodInvocation inside the invoke().

    Is this the right way to approach the issue? was it the intentional to not allow access to the Target object inside the invocation?

    thanks

  • #2
    You do have access to the target. Use
    Code:
    MethodInvocation.getThis()
    which is inherited from Joinpoint.

    Comment


    • #3
      Thanks..it was my mistake ...i didn't notice it

      Comment

      Working...
      X