File tree 3 files changed +62
-0
lines changed
main/java/com/github/codestickers
test/java/com/github/codestickers
3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .github .codestickers ;
2
+
3
+ import java .lang .annotation .*;
4
+
5
+ /**
6
+ * This annotation contains related information.
7
+ */
8
+ @ Retention (RetentionPolicy .CLASS )
9
+ @ Target ({ElementType .TYPE ,
10
+ ElementType .FIELD ,
11
+ ElementType .METHOD ,
12
+ ElementType .PARAMETER ,
13
+ ElementType .CONSTRUCTOR ,
14
+ ElementType .LOCAL_VARIABLE ,
15
+ ElementType .ANNOTATION_TYPE ,
16
+ ElementType .PACKAGE ,
17
+ ElementType .TYPE_PARAMETER ,
18
+ ElementType .TYPE_USE })
19
+ @ Documented
20
+ @ Repeatable (Importants .class )
21
+ public @interface Important {
22
+ String value () default "" ;
23
+ }
Original file line number Diff line number Diff line change
1
+ package com .github .codestickers ;
2
+
3
+ import java .lang .annotation .*;
4
+
5
+ /**
6
+ * A container for annotation repetition.
7
+ */
8
+ @ Retention (RetentionPolicy .CLASS )
9
+ @ Target ({ElementType .TYPE ,
10
+ ElementType .FIELD ,
11
+ ElementType .METHOD ,
12
+ ElementType .PARAMETER ,
13
+ ElementType .CONSTRUCTOR ,
14
+ ElementType .LOCAL_VARIABLE ,
15
+ ElementType .ANNOTATION_TYPE ,
16
+ ElementType .PACKAGE ,
17
+ ElementType .TYPE_PARAMETER ,
18
+ ElementType .TYPE_USE })
19
+ @ Documented
20
+ public @interface Importants
21
+ {
22
+ Important [] value ();
23
+ }
Original file line number Diff line number Diff line change
1
+ package com .github .codestickers ;
2
+
3
+ public class ImportantTest {
4
+
5
+ @ Important ("first one" )
6
+ @ Important ("duplicate" )
7
+ public static class SomeClass {
8
+ @ Important ("check if really required" )
9
+ public SomeClass () {
10
+ }
11
+
12
+ public @ Important ("dont know how" ) Void m (@ Important long param ) {
13
+ return null ;
14
+ }
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments