-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christopher White <[email protected]>
- Loading branch information
1 parent
09052d0
commit 6742542
Showing
10 changed files
with
883 additions
and
684 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
43 changes: 43 additions & 0 deletions
43
util/src/main/java/tc/oc/pgm/util/nms/reflect/Reflect.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,95 @@ | ||
package tc.oc.pgm.util.nms.reflect; | ||
|
||
import java.lang.annotation.Repeatable; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface Reflect { | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(NMS.List.class) | ||
@interface NMS { | ||
String value(); | ||
|
||
Class<?>[] parameters() default {}; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@interface List { | ||
NMS[] value(); | ||
} | ||
} | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(CB.List.class) | ||
@interface CB { | ||
String value(); | ||
|
||
Class<?>[] parameters() default {}; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@interface List { | ||
CB[] value(); | ||
} | ||
} | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(B.List.class) | ||
@interface B { | ||
String value(); | ||
|
||
Class<?>[] parameters() default {}; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@interface List { | ||
B[] value(); | ||
} | ||
} | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(StaticMethod.List.class) | ||
@interface StaticMethod { | ||
String value(); | ||
|
||
Class<?>[] parameters() default {}; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@interface List { | ||
StaticMethod[] value(); | ||
} | ||
} | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(Method.List.class) | ||
@interface Method { | ||
String value(); | ||
|
||
Class<?>[] parameters() default {}; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@interface List { | ||
Method[] value(); | ||
} | ||
} | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(Field.List.class) | ||
@interface Field { | ||
String value(); | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@interface List { | ||
Field[] value(); | ||
} | ||
} | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(Constructor.List.class) | ||
@interface Constructor { | ||
Class<?>[] value() default {}; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
@interface List { | ||
Constructor[] value(); | ||
} | ||
} | ||
} |
This file contains 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
Oops, something went wrong.