LexManos

Untitled

Sep 8th, 2014
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. public class Test
  2. {
  3.     @javax.annotation.Nullable
  4.     @Deprecated
  5.     public static void main(String[] args) throws Exception
  6.     {
  7.         java.lang.reflect.Method m = Test.class.getMethod("main", String[].class);
  8.         System.out.println(m.getName());
  9.         for (java.lang.annotation.Annotation a : m.getAnnotations())
  10.         {
  11.             System.out.println("  " + a.toString());
  12.         }
  13.     }
  14. }
  15.  
  16.  
  17. C:\Users\Lex\Desktop\asdf>java -cp build\libs\asdf.jar Test
  18. main
  19.   @java.lang.Deprecated()
  20.  
  21. C:\Users\Lex\Desktop\asdf>java -cp build\libs\asdf.jar;jsr305-1.3.9.jar Test
  22. main
  23.   @javax.annotation.Nullable()
  24.   @java.lang.Deprecated()
Advertisement
Add Comment
Please, Sign In to add comment