0

My advice method accepts an object parameter Foo, but the point cut method also accepts an object parameter Bar.

In the point cut method, there are two variables that are part of the Foo object needed to be passed into advice method.

How can I implement this? Thanks in advance.

pointcut method:

aPointCutMethod(Bar bar){

    // These two params needed to be used to construct Foo object and pass it to the   advice method
    String attr1;
    String attr2;
}

Foo object:

Class Foo {
    String attr1;
    String attr2;
}

advice method:

anAdviceMethod(Foo foo);
4

0 回答 0