| get the value of an attribute inside an advice [message #669697] |
Wed, 11 May 2011 04:11 |
moha Messages: 43 Registered: March 2011 |
Member |
|
|
Hi,
i want to get the value of attribute defined in the class below
using aspectj:
public class Test {
public String attribute = "string";
public void myMethod (){
.....
}
}
i developped an aspect using aspectj annotation :
@Aspect
public class TestAspect {
@Pointcut("execution(* *.Test.myMethod(..))")
public void myPointcut() {
}
@Before("myPointcut()")
public void myAdvice(JoinPoint joinPoint){
//how can i use joinPoint to get the value of attribute in Test class
}
}
Question : how can i use joinPoint to get the value of attribute in Test class ????
thanks;
|
|
|
Powered by
FUDForum. Page generated in 0.01522 seconds