I have an annotation like this:
@Inherited
@Documented
@Target(value={ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Restful {
}
I annotated this class like this:
@Restful
public class TestAspect {
public String yes;
}
I have a pointcut like this:
@Pointcut("@annotation(com.rest.config.Restful)")
public void pointCutMethod() {
}
I tried:
@Before("pointCutMethod()")
public void beforeClass(JoinPoint joinPoint) {
System.out.println("@Restful DONE");
System.out.println(joinPoint.getThis());
}
But getThis() returns null.
Basically I am trying to get that Object instance of TestAspect. How do I do it? Any clue? any help would be really appreciated.
Thanks in advance