Nudity / 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

Need .java file in external jars ?? #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I have a simple annotation,

@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface Test {
    String name();
}

I can get classes having this annotation when they are in my project. When I 
move those classes to an external jar the classes are not found.

Reflections reflections = new Reflections(new ConfigurationBuilder()
.setUrls(ClasspathHelper.forPackage(packageName))
.setUrls(ClasspathHelper.forWebInfLib(servletContext)));
Set<Class<?>> annotated = reflections.getTypesAnnotatedWith(Test.class);

If I package my external jar with the source code (.java files) it starts 
working.

Have you heard something like that ???

Thanks a lot !

Original issue reported on code.google.com by pierrelu...@gmail.com on 18 Nov 2012 at 3:55

GoogleCodeExporter commented 9 years ago
odd. can you send a reproducible code?

Original comment by ronm...@gmail.com on 20 Feb 2013 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by ronm...@gmail.com on 23 Mar 2013 at 4:15