aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/ftbsc/lll/processor/annotations/FindMethod.java')
-rw-r--r--src/main/java/ftbsc/lll/processor/annotations/FindMethod.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java b/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java
index bf93442..1705619 100644
--- a/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java
+++ b/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java
@@ -17,7 +17,23 @@ import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.CLASS)
@java.lang.annotation.Target(ElementType.METHOD)
public @interface FindMethod {
- Class<?> parent();
+ /**
+ * @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 "";
- Class<?>[] params();
+
+ /**
+ * @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 {};
}