Skip to content

Instantly share code, notes, and snippets.

@sergiolopes
Created April 18, 2012 01:26
Show Gist options
  • Select an option

  • Save sergiolopes/2410359 to your computer and use it in GitHub Desktop.

Select an option

Save sergiolopes/2410359 to your computer and use it in GitHub Desktop.
public class VRaptorExtension implements Extension {
public <T> void processAnnotatedType(@Observes ProcessAnnotatedType<T> pat) {
Class<T> clazz = pat.getAnnotatedType().getJavaClass();
if (clazz.isAnnotationPresent(Resource.class)) {
System.out.println("Found an @Resource" + clazz.getName());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment