Announcement Announcement Module
Collapse
No announcement yet.
AspectJ Pointcut definition Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AspectJ Pointcut definition

    Hi everyone,

    If I have something like that:

    <code>
    package A;
    import B;
    public classA implements InterfaceB{

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

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

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

    }
    <code/>

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

    }
    <code/>

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

    }
    <code/>


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

    }
    <code/>

    <code>
    package H;

    public InterfaceH<Object,Object>{


    }
    <code/>

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

    <code>
    @Pointcut("within(A..*)")
    </code>

    <code>
    @Pointcut("within(B..*)")
    </code>

    <code>
    @Pointcut("execution(* B.*.*(..))")
    </code>

    Thanks
Working...
X