Skip to content

Instantly share code, notes, and snippets.

@amitshekhariitbhu
Last active March 20, 2018 08:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amitshekhariitbhu/a2afd66e4325acaf575108c04d7f91a1 to your computer and use it in GitHub Desktop.
Save amitshekhariitbhu/a2afd66e4325acaf575108c04d7f91a1 to your computer and use it in GitHub Desktop.
Class foo = Foo.class;
for(Method method : foo.getMethods()) {
Status statusAnnotation = (Status)method.getAnnotation(Status.class);
if(statusAnnotation != null) {
System.out.println(" Method Name : " + method.getName());
System.out.println(" Author : " + statusAnnotation.author());
System.out.println(" Priority : " + statusAnnotation.priority());
System.out.println(" Completion Status : " + statusAnnotation.completion());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment