chore: fixed javadocs

This commit is contained in:
zaaarf 2023-03-18 17:43:42 +01:00
parent 344e66061b
commit eea87d367f
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C
5 changed files with 13 additions and 8 deletions

View file

@ -9,8 +9,6 @@ import java.lang.annotation.RetentionPolicy;
/** /**
* Overrides the marked method in the Injector, having the * Overrides the marked method in the Injector, having the
* implementation return a built {@link FieldProxy}. * implementation return a built {@link FieldProxy}.
* @implNote if name is omitted, name of the annotated method
* is used.
* @since 0.2.0 * @since 0.2.0
*/ */
@Retention(RetentionPolicy.CLASS) @Retention(RetentionPolicy.CLASS)
@ -24,8 +22,9 @@ public @interface FindField {
Class<?> parent() default Object.class; 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 * @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 ""; String name() default "";
} }

View file

@ -10,8 +10,6 @@ import java.lang.annotation.RetentionPolicy;
* Overrides the marked method in the Injector, having the * Overrides the marked method in the Injector, having the
* implementation return a built {@link MethodProxy} with * implementation return a built {@link MethodProxy} with
* the specified parameters. * the specified parameters.
* @implNote if name is omitted, the name of the annotated
* method is used.
* @since 0.2.0 * @since 0.2.0
*/ */
@Retention(RetentionPolicy.CLASS) @Retention(RetentionPolicy.CLASS)
@ -25,6 +23,8 @@ public @interface FindMethod {
Class<?> parent() default Object.class; 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 * @return the name of the method, will default to the empty string
* (the name of the annotated method will instead be used) * (the name of the annotated method will instead be used)
*/ */

View file

@ -20,9 +20,10 @@ public @interface Target {
/** /**
* When set to false, tells the processor to first try to match a single method by name, * 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. * and to only check parameters if further clarification is needed.
* @implNote While non-strict mode is more computationally efficient, it's ultimately not * 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 * relevant, as it only matters at compile time. Do not set this to false unless
* you know what you're doing. * you know what you're doing.
* @return whether strict mode is to be used
* @since 0.3.0 * @since 0.3.0
*/ */
boolean strict() default true; boolean strict() default true;

View file

@ -112,6 +112,7 @@ public class ASTUtils {
* Safely extracts a {@link Class} from an annotation and gets its fully qualified name. * Safely extracts a {@link Class} from an annotation and gets its fully qualified name.
* @param ann the annotation containing the class * @param ann the annotation containing the class
* @param fun the annotation function returning 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 * @return the fully qualified name of the given class
* @since 0.3.0 * @since 0.3.0
*/ */
@ -128,6 +129,7 @@ public class ASTUtils {
* @param ann the annotation containing the class * @param ann the annotation containing the class
* @param fun the annotation function returning the class * @param fun the annotation function returning the class
* @param elementUtils the element utils corresponding to the {@link ProcessingEnvironment} * @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 * @return a list of {@link TypeMirror}s representing the classes
* @since 0.3.0 * @since 0.3.0
*/ */
@ -183,6 +185,7 @@ public class ASTUtils {
* Finds the member name and maps it to the correct format. * Finds the member name and maps it to the correct format.
* @param parentFQN the already mapped FQN of the parent class * @param parentFQN the already mapped FQN of the parent class
* @param memberName the name of the member * @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 * @param mapper the {@link ObfuscationMapper} to use, may be null
* @return the internal class name * @return the internal class name
* @since 0.3.0 * @since 0.3.0

View file

@ -97,6 +97,8 @@ public class JavaPoetUtils {
* Builds a (partial, not including the return type) method descriptor from its parameters * Builds a (partial, not including the return type) method descriptor from its parameters
* @param ann the annotation containing the class * @param ann the annotation containing the class
* @param fun the annotation function returning 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 * @return the method descriptor
*/ */
public static <T extends Annotation> String methodDescriptorFromParams(T ann, Function<T, Class<?>[]> fun, Elements elementUtils) { public static <T extends Annotation> String methodDescriptorFromParams(T ann, Function<T, Class<?>[]> fun, Elements elementUtils) {