Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Join Point Static Part

Hello,

    I am trying to write a logging aspect. Something that logs method
arguments when the method executed. I was looking up the reflection
apis for aspectj and did not find anything in either StaticPart,
ProceedingJoinPoint or Signature that would give me the method
arguments names.

As as example
    @Pointcut("execution(@Unit * *(..)) && @annotation(u) &&
@within(ct) && this(cinstance)")
    public void unit(Auditable cinstance, Container ct, Unit u) {
    }

    @Around(unit(ct, u))
    public void do(ProceedingJoinPoint pjp, Auditable cinstance,
Container ct, Unit u){
      pjp.getMethodArgNames(); //???
    }

  Any ideas on where I can get the method argument names?

Thanks
Bhaskar


Back to the top