diff options
author | zaaarf <zaaarf@proton.me> | 2023-03-18 17:43:42 +0100 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-03-18 17:43:42 +0100 |
commit | eea87d367f33b7c45b453f84227102057d3ca112 (patch) | |
tree | 78d09929f888b95540eed635cd9a131c33556044 /src/main/java/ftbsc/lll/processor | |
parent | 344e66061b31a83f7ace2ab887e80f782f560297 (diff) |
chore: fixed javadocs0.3.0
Diffstat (limited to 'src/main/java/ftbsc/lll/processor')
5 files changed, 13 insertions, 8 deletions
diff --git a/src/main/java/ftbsc/lll/processor/annotations/FindField.java b/src/main/java/ftbsc/lll/processor/annotations/FindField.java index 40de173..4063c17 100644 --- a/src/main/java/ftbsc/lll/processor/annotations/FindField.java +++ b/src/main/java/ftbsc/lll/processor/annotations/FindField.java @@ -9,8 +9,6 @@ import java.lang.annotation.RetentionPolicy; /** * Overrides the marked method in the Injector, having the * implementation return a built {@link FieldProxy}. - * @implNote if name is omitted, name of the annotated method - * is used. * @since 0.2.0 */ @Retention(RetentionPolicy.CLASS) @@ -24,8 +22,9 @@ public @interface FindField { Class<?> parent() default Object.class; /** + * The name of the field to find. If omitted, the name of the annotated + * method will be used. * @return the name of the field, will default to the empty string - * (the name of the annotated method will instead be used) */ String name() default ""; } diff --git a/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java b/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java index 1705619..25db816 100644 --- a/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java +++ b/src/main/java/ftbsc/lll/processor/annotations/FindMethod.java @@ -10,8 +10,6 @@ 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) @@ -25,6 +23,8 @@ public @interface FindMethod { Class<?> parent() default Object.class; /** + * The name of the method to find. If omitted, the name of the annotated + * method will be used. * @return the name of the method, will default to the empty string * (the name of the annotated method will instead be used) */ diff --git a/src/main/java/ftbsc/lll/processor/annotations/Target.java b/src/main/java/ftbsc/lll/processor/annotations/Target.java index dbe7cf6..15967cb 100644 --- a/src/main/java/ftbsc/lll/processor/annotations/Target.java +++ b/src/main/java/ftbsc/lll/processor/annotations/Target.java @@ -20,9 +20,10 @@ 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 false unless - * you know what you're doing. + * 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 false unless + * you know what you're doing. + * @return whether strict mode is to be used * @since 0.3.0 */ boolean strict() default true; diff --git a/src/main/java/ftbsc/lll/processor/tools/ASTUtils.java b/src/main/java/ftbsc/lll/processor/tools/ASTUtils.java index 1735b66..d492382 100644 --- a/src/main/java/ftbsc/lll/processor/tools/ASTUtils.java +++ b/src/main/java/ftbsc/lll/processor/tools/ASTUtils.java @@ -112,6 +112,7 @@ public class ASTUtils { * Safely extracts a {@link Class} from an annotation and gets its fully qualified name. * @param ann the annotation containing the class * @param fun the annotation function returning the class + * @param <T> the type of the annotation carrying the information * @return the fully qualified name of the given class * @since 0.3.0 */ @@ -128,6 +129,7 @@ public class ASTUtils { * @param ann the annotation containing the class * @param fun the annotation function returning the class * @param elementUtils the element utils corresponding to the {@link ProcessingEnvironment} + * @param <T> the type of the annotation carrying the information * @return a list of {@link TypeMirror}s representing the classes * @since 0.3.0 */ @@ -183,6 +185,7 @@ public class ASTUtils { * Finds the member name and maps it to the correct format. * @param parentFQN the already mapped FQN of the parent class * @param memberName the name of the member + * @param methodDescriptor the descriptor of the method, may be null if it's not a method * @param mapper the {@link ObfuscationMapper} to use, may be null * @return the internal class name * @since 0.3.0 diff --git a/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java b/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java index 18f9ed6..fe64488 100644 --- a/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java +++ b/src/main/java/ftbsc/lll/processor/tools/JavaPoetUtils.java @@ -97,6 +97,8 @@ public class JavaPoetUtils { * Builds a (partial, not including the return type) method descriptor from its parameters * @param ann the annotation containing the class * @param fun the annotation function returning the class + * @param elementUtils the {@link Elements} containing utils for the current processing environment + * @param <T> the type of the annotation carrying the information * @return the method descriptor */ public static <T extends Annotation> String methodDescriptorFromParams(T ann, Function<T, Class<?>[]> fun, Elements elementUtils) { |