-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathMethod.java
More file actions
45 lines (38 loc) · 1.22 KB
/
Method.java
File metadata and controls
45 lines (38 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package org.inventivetalent.reflection.annotation;
import org.inventivetalent.reflection.minecraft.Minecraft;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Resolves the annotated {@link org.inventivetalent.reflection.resolver.wrapper.MethodWrapper} or {@link java.lang.reflect.Method} field to the first matching method name.
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@SuppressWarnings("unused")
public @interface Method {
/**
* Name of the class to load this method from
*
* @return name of the class
*/
String className();
/**
* Possible names of the method. Use <code>></code> or <code><</code> as a name prefix in combination with {@link #versions()} to specify versions newer- or older-than.
*
* @return method names
*/
String[] value();
/**
* Specific versions for the names.
*
* @return Array of versions for the class names
*/
Minecraft.Version[] versions() default {};
/**
* Whether to ignore any reflection exceptions thrown. Defaults to <code>true</code>
*
* @return whether to ignore exceptions
*/
boolean ignoreExceptions() default true;
}