blob: 170561941b14a7ad2efac02091c5374b58b25aa3 (
plain) (
blame)
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
|
package ftbsc.lll.processor.annotations;
import ftbsc.lll.proxies.MethodProxy;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Overrides the marked method in the Injector, having the
* implementation return a built {@link MethodProxy} with
* the specified parameters.
* @implNote if name is omitted, the name of the annotated
* method is used.
* @since 0.2.0
*/
@Retention(RetentionPolicy.CLASS)
@java.lang.annotation.Target(ElementType.METHOD)
public @interface FindMethod {
/**
* @return the {@link Class} object containing the desired method,
* or the {@link Object} class if not specified (the {@link Class}
* from {@link Patch#value()} is instead used)
*/
Class<?> parent() default Object.class;
/**
* @return the name of the method, will default to the empty string
* (the name of the annotated method will instead be used)
*/
String name() default "";
/**
* @return a list of the parameters of the method, will default to empty
* array (in that case, an attempt will be made to match a method without
* args first)
*/
Class<?>[] params() default {};
}
|