aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/processor/annotations/Target.java
blob: 38477d1c8e3000489c26340c82b79c8eea7caa17 (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
package ftbsc.lll.processor.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * Marks a method as the target method.
 * The method itself should have the same name, return type and parameters as the desired
 * Minecraft method.
 * It will also be discarded unless the containing class is annotated with {@link Patch}
 * and another method within the class is annotated with {@link Injector}.
 * @see Patch
 * @see Injector
 */
@Retention(RetentionPolicy.CLASS)
@java.lang.annotation.Target(ElementType.METHOD)
public @interface Target {

   /**
    * When set to false, tells the processor to first try to match a single method by name,
    * and to only check parameters if further clarification is needed.
    * @implNote While non-strict mode is more computationally efficient, it's ultimately not
    *           relevant, as it only matters at compile time. Do not set this to true unless
    *           you are sure know what you're doing.
    * @since 0.3.0
    */
   boolean strict() default true;
}