Skip to content

Instantly share code, notes, and snippets.

@pwittchen
Created September 2, 2016 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwittchen/a727943ea2733faedf83986f8f310444 to your computer and use it in GitHub Desktop.
Save pwittchen/a727943ea2733faedf83986f8f310444 to your computer and use it in GitHub Desktop.
for(final Annotation annotation : this.getClass().getAnnotations()) {
final Class<? extends Annotation> annotationType = annotation.annotationType();
final boolean classIsAnnotated = annotationType.equals(MyCustomAnnotation.class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment