Results 1 to 3 of 3

Thread: AspectJ Pointcut definition

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Question AspectJ Pointcut definition

    Hi everyone,

    If I have something like that:


    package A;
    import B;
    public classA implements InterfaceB{

    //implementation of all methods (methods of interface A,B,C..)
    }



    package B;
    import C;
    public InterfaceB extends InterfaceC<Object,Object>, InterfaceD<Object,Object>{
    public void MyMethod();

    }

    package C;
    import D;
    public InterfaceC<Object,Object> extends InterfaceE<Object,Object>, InterfaceF<Object>{
    public Object MyMethod();

    }

    package D;
    import E;
    public InterfaceD<Object,Object> extends InterfaceE<Object,Object>{
    public Object MyMethod();

    }

    package E;
    import G;
    public InterfaceE<Object,Object> extends InterfaceG<Object,Object>{
    public Object MyMethod(Object o);

    }

    package G;
    import H;
    public InterfaceG<Object,Object> extends InterfaceH<Object,Object>{
    public void MyMethod(Object O);

    }

    package H;

    public InterfaceH<Object,Object>{


    }


    I want to intercept all methods of the class ClassA,
    I used these pointcuts, but i'm not sure:


    @Pointcut("within(A..*)")

    @Pointcut("within(B..*)")

    @Pointcut("execution(* B.*.*(..))")

    Thanks

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

    Default

    If you post then

    1. Don't post the same question multiple times
    2. Use [ code][/code ] tags so that we can easily read the code/xml/stacktraces.\
    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
    Join Date
    Jul 2012
    Posts
    6

    Default

    Sorry, I'm just new in this forum
    ok, I'll respect this next time

Posting Permissions

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