Created
April 12, 2015 19:18
-
-
Save soc/66b68980c581d13882ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.RetentionPolicy; | |
| import java.lang.annotation.Target; | |
| import java.lang.annotation.ElementType; | |
| @Retention(RetentionPolicy.RUNTIME) | |
| @Target({ElementType.TYPE, ElementType.METHOD}) | |
| public @interface Foo { } | |
| //@Retention(value = RetentionPolicy.RUNTIME) | |
| @Target(ElementType.TYPE) | |
| @interface Val { | |
| // Class clazz(); | |
| } | |
| @interface Bla { | |
| Class value(); | |
| Class clazz(); | |
| } | |
| @Foo @Val(/*clazz = String.class*/) @Bla(value = RetentionPolicy.RUNTIME, clazz = String.class) class Bar { | |
| Bar(int x) throws NullPointerException { | |
| } | |
| int[] foo()[] throws Exception, RuntimeException { | |
| return null; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment