diff --git a/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/AbstractDBAnnotationValidator.java b/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/AbstractDBAnnotationValidator.java index 3b5886c948..ef5933ebed 100644 --- a/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/AbstractDBAnnotationValidator.java +++ b/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/AbstractDBAnnotationValidator.java @@ -20,11 +20,13 @@ import java.lang.annotation.Annotation; import javax.lang.model.element.*; import javax.tools.Diagnostic.Kind; +import ghidra.util.database.DBAnnotatedObject; + /** * An abstract class for validating annotations on {@link DBAnnotatedObject}. + * *
- * Performs validation checks on annotated fields and their enclosing types. - *
+ * Performs validation checks on annotated fields and their enclosing types. */ public class AbstractDBAnnotationValidator { protected final ValidationContext ctx; diff --git a/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/AccessSpec.java b/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/AccessSpec.java index 74c94a03d6..5ab1e43450 100644 --- a/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/AccessSpec.java +++ b/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/AccessSpec.java @@ -20,8 +20,8 @@ import java.util.Set; import javax.lang.model.element.Modifier; /** - * An enum to represent different levels of access specifiers - * (private, package-private, protected, public) with corresponding access levels + * An enum to represent different levels of access specifiers (private, package-private, protected, + * public) with corresponding access levels */ public enum AccessSpec { PRIVATE(0), PACKAGE(1), PROTECTED(2), PUBLIC(3); diff --git a/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/DBAnnotatedColumnValidator.java b/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/DBAnnotatedColumnValidator.java index ac128e35a8..04220bb76c 100644 --- a/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/DBAnnotatedColumnValidator.java +++ b/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/DBAnnotatedColumnValidator.java @@ -23,10 +23,11 @@ import javax.tools.Diagnostic.Kind; import ghidra.util.database.annot.DBAnnotatedColumn; /** - * A class for validating fields annotated with {@link DBAnnotatedColumn} + * A class for validating fields annotated with {@link DBAnnotatedColumn}. + * *- * To ensure fields annotated with {@link DBAnnotatedColumn} - * comply with the expected criteria for database columns in Ghidra. + * To ensure fields annotated with {@link DBAnnotatedColumn} comply with the expected criteria for + * database columns in Ghidra. *
*/ @@ -34,9 +35,11 @@ public class DBAnnotatedColumnValidator extends AbstractDBAnnotationValidator { final VariableElement column; /** - * Construct a new {@code DBAnnotatedColumnValidator} with the specified validation context and the column element. - * @param ctx - * @param column + * Construct a new {@code DBAnnotatedColumnValidator} with the specified validation context and + * the column element. + * + * @param ctx the validation context + * @param column the field representing the column */ public DBAnnotatedColumnValidator(ValidationContext ctx, VariableElement column) { super(ctx); @@ -47,14 +50,14 @@ public class DBAnnotatedColumnValidator extends AbstractDBAnnotationValidator { * Validate the annotated column field. * *- * It performs the following checks to ensure it meets the requirements for database columns: - *
- * To ensure fields annotated with {@link DBAnnotatedField} meet the criteria required for database fields - * in Ghidra. It extends the {@code AbstractDBAnnotationValidator} to provide additional - * validation logic specific to database field annotations. - *
+ * To ensure fields annotated with {@link DBAnnotatedField} meet the criteria required for database + * fields in Ghidra. It extends the {@code AbstractDBAnnotationValidator} to provide additional + * validation logic specific to database field annotations. */ public class DBAnnotatedFieldValidator extends AbstractDBAnnotationValidator { final VariableElement field; @@ -48,9 +48,11 @@ public class DBAnnotatedFieldValidator extends AbstractDBAnnotationValidator { final TypeElement ENUM_CODEC_ELEM; /** - * Construct a new {@code DBAnnotatedFieldValidator} with the specified validation context and field element. - * @param ctx - * @param field + * Construct a new {@code DBAnnotatedFieldValidator} with the specified validation context and + * field element. + * + * @param ctx the validation context + * @param field the field to validate */ public DBAnnotatedFieldValidator(ValidationContext ctx, VariableElement field) { super(ctx); @@ -118,15 +120,16 @@ public class DBAnnotatedFieldValidator extends AbstractDBAnnotationValidator { /** * Validate the annotated field to ensure it meets the requirements for database fields. + * *- * It performs the following checks: - *
- * This processor performs compile-time validation checks on annotations related to - * {@link DBAnnotatedObject}. - * Currently just performs compile-time checks. It does not generate any code, but perhaps one day, - * it will. - *
+ * This processor performs compile-time validation checks on annotations related to + * {@link DBAnnotatedObject}. Currently just performs compile-time checks. It does not generate any + * code, but perhaps one day, it will. */ //@AutoService(Processor.class) // TODO: Evaluate Google's auto-service as a dependency public class DBAnnotatedObjectProcessor extends AbstractProcessor { @@ -60,7 +58,8 @@ public class DBAnnotatedObjectProcessor extends AbstractProcessor { * * @param annotations the set of annotations to process * @param roundEnv the environment for information about the current and prior round - * @return {@code true} if the annotations are claimed by this processor, {@code false} otherwise + * @return {@code true} if the annotations are claimed by this processor, {@code false} + * otherwise */ @Override public boolean process(Set extends TypeElement> annotations, RoundEnvironment roundEnv) { @@ -104,7 +103,6 @@ public class DBAnnotatedObjectProcessor extends AbstractProcessor { @Override public Iterable extends Completion> getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) { - // TODO Auto-generated method stub return super.getCompletions(element, annotation, member, userText); } @@ -125,7 +123,8 @@ public class DBAnnotatedObjectProcessor extends AbstractProcessor { */ @Override public Set- * This class ensures that annotations such as {@link DBAnnotatedField}, {@link DBAnnotatedColumn}, - * and {@link DBAnnotatedObjectInfo} are applied correctly and consistently on the fields and columns - * of a class. - *
+ * This class ensures that annotations such as {@link DBAnnotatedField}, {@link DBAnnotatedColumn}, + * and {@link DBAnnotatedObjectInfo} are applied correctly and consistently on the fields and + * columns of a class. */ public class DBAnnotatedObjectValidator { private final ValidationContext ctx; @@ -71,6 +72,8 @@ public class DBAnnotatedObjectValidator { /** * Validate the annotated fields, columns, and the type element itself. + * + *
* Checks for various annotation constraints and consistency rules.
*/
public void validate() {
@@ -160,6 +163,7 @@ public class DBAnnotatedObjectValidator {
/**
* Check that the access specifiers of the field and column are compatible.
+ *
* @param field the field element
* @param column the column element
* @param name the name of the column
diff --git a/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/ValidationContext.java b/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/ValidationContext.java
index c712382020..59bf346c4b 100644
--- a/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/ValidationContext.java
+++ b/Ghidra/Debug/AnnotationValidator/src/main/java/ghidra/util/database/annotproc/ValidationContext.java
@@ -74,7 +74,7 @@ public class ValidationContext {
* Check if the field has the specified type.
*
* @param field the field element
- * @param type the type element
+ * @param type the type element
* @return true if the field has the specified type, false otherwise
*/
public boolean hasType(VariableElement field, TypeElement type) {
@@ -85,7 +85,7 @@ public class ValidationContext {
* Check if the field has the specified type.
*
* @param field the field element
- * @param type the type mirror
+ * @param type the type mirror
* @return true if the field has the specified type, false otherwise
*/
public boolean hasType(VariableElement field, TypeMirror type) {
@@ -153,10 +153,9 @@ public class ValidationContext {
}
/**
- * Find the supertype of a set of declared types that matches the specified
- * super type.
+ * Find the supertype of a set of declared types that matches the specified super type.
*
- * @param types the set of declared types
+ * @param types the set of declared types
* @param superType the super type element to match
* @return the matching declared type, or null if no match is found
*/
@@ -180,10 +179,9 @@ public class ValidationContext {
}
/**
- * Find the supertype of a declared type that matches the specified super type
- * element.
+ * Find the supertype of a declared type that matches the specified super type element.
*
- * @param type the declared type
+ * @param type the declared type
* @param superElem the super type element to match
* @return the matching declared type, or null if no match is found
*/
@@ -192,10 +190,9 @@ public class ValidationContext {
}
/**
- * Find the supertype of a type element that matches the specified super type
- * element.
+ * Find the supertype of a type element that matches the specified super type element.
*
- * @param elem the type element
+ * @param elem the type element
* @param superElem the super type element to match
* @return the matching declared type, or null if no match is found
*/
@@ -224,7 +221,7 @@ public class ValidationContext {
/**
* Get the type arguments of a declared type as a map.
*
- * @param type the declared type
+ * @param type the declared type
* @param superElem the super type element
* @return a map of type argument names to their corresponding type mirrors
*/
@@ -235,7 +232,7 @@ public class ValidationContext {
/**
* Get the type arguments of a type element as a map.
*
- * @param elem the type element
+ * @param elem the type element
* @param superElem the super type element
* @return a map of type argument names to their corresponding type mirrors
*/
@@ -263,8 +260,8 @@ class FormatVisitor implements TypeVisitor