Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Get all joinpoints from aspect?

Hello,

I would like to get a list of all classes that are annotated with
@Wanted at runtime. Is it possible to use apectj for it? Something
like to ask an aspect to return all joinpoints and from them I would
get the classes. Annotated class and aspect below.

Thank you,
Pavel


@Wanted
public class MyClass {
	public void someMethod(){
    }
}

public aspect A {
	
	pointcut p():
		execution(* *(..)) &&
		within(@Wanted *);

	Object around() : p(){
		return proceed();
	}
}


Back to the top