vancetang / reflections

Automatically exported from code.google.com/p/reflections
Do What The F*ck You Want To Public License
0 stars 0 forks source link

Problems searching for annotated methods across packages #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. A method is annotated with an annotation.
2. Configure reflections to search the immediate package.

What is the expected output? What do you see instead?
Expected: A Set containing the annotated method(es).
Actual: An empty set.

What version of the product are you using? On what operating system?
0.9.7.RC1

Please provide any additional information below.

Original issue reported on code.google.com by kobi...@gmail.com on 20 May 2012 at 3:06

Attachments:

GoogleCodeExporter commented 9 years ago
you should add new MethodAnnotationsScanner() to the Reflections constructor:

Set<Method> methods = new Reflections("org.reflections", new 
MethodAnnotationsScanner()).getMethodsAnnotatedWith(Test.class);

Original comment by ronm...@gmail.com on 22 May 2012 at 7:56