Results 1 to 3 of 3

Thread: Tricky Issue: Around Advice for scanning target methods parameters

  1. #1

    Default Tricky Issue: Around Advice for scanning target methods parameters

    @Around("execution(* com.abc.processor.*.*(..))")
    public Object examineParameters(ProceedingJoinPoint pjp, ???????????????)
    throws Throwable
    {
    String newPattern = ???????????????????????????
    return pjp.proceed(new Object[] {newPattern});
    }
    -----------------------
    I am trying to build an around advice for printing out all target methods parameters. The problem is that the target methods could have any signatures.

    Is spring AOP even supports ways for capturing any unknown method parameters signatures, so that any parameters are available for an advice method?

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    You can simply retrieve ALL parameters from the JoinPoint...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Quote Originally Posted by Marten Deinum View Post
    You can simply retrieve ALL parameters from the JoinPoint...
    Thanks for the tip.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •