Results 1 to 3 of 3

Thread: pointcut expression for non final field access

  1. #1
    Join Date
    Nov 2004
    Location
    Hilversum - The Netherlands
    Posts
    1,054

    Default pointcut expression for non final field access

    I'm currently playing with a ConcurrencyDetectionAspect and I would like to create a pointcut expression for reads/writes on non final fields on a specific package (and all subpackages).

    This doesn't work:

    get(* !final org.apache.catalina..*)||set(* !final org.apache.catalina..*)

    but this does:

    get(* org.apache.catalina..*)||set(* org.apache.catalina..*)

    So something is wrong with the !final part.

    Is anybody able to solve this problem?
    Last edited by Alarmnummer; Mar 25th, 2008 at 05:11 PM.

  2. #2
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    Try:

    get(!final * org.apache.catalina..*)||set(!final * org.apache.catalina..*)

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

  3. #3
    Join Date
    Nov 2004
    Location
    Hilversum - The Netherlands
    Posts
    1,054

    Default

    Thanks, it works.

Posting Permissions

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