diff --git a/src/main/java/com/power/doc/builder/ProjectDocConfigBuilder.java b/src/main/java/com/power/doc/builder/ProjectDocConfigBuilder.java index f20d796..2db2626 100644 --- a/src/main/java/com/power/doc/builder/ProjectDocConfigBuilder.java +++ b/src/main/java/com/power/doc/builder/ProjectDocConfigBuilder.java @@ -33,7 +33,6 @@ import com.power.doc.model.SourceCodePath; import com.power.doc.utils.JavaClassUtil; import com.thoughtworks.qdox.JavaProjectBuilder; import com.thoughtworks.qdox.model.JavaClass; -import com.thoughtworks.qdox.model.JavaField; import java.io.File; import java.util.Collection; diff --git a/src/main/java/com/power/doc/utils/JavaClassUtil.java b/src/main/java/com/power/doc/utils/JavaClassUtil.java index 91edcbf..33859af 100644 --- a/src/main/java/com/power/doc/utils/JavaClassUtil.java +++ b/src/main/java/com/power/doc/utils/JavaClassUtil.java @@ -35,7 +35,6 @@ import com.thoughtworks.qdox.model.expression.TypeRef; import com.thoughtworks.qdox.model.impl.DefaultJavaField; import com.thoughtworks.qdox.model.impl.DefaultJavaParameterizedType; -import javax.print.Doc; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -82,7 +81,7 @@ public class JavaClassUtil { JavaClass pcls = cls1.getSuperJavaClass(); fieldList.addAll(getFields(pcls, i)); List docJavaFields = new ArrayList<>(); - for(JavaField javaField:cls1.getFields()){ + for (JavaField javaField : cls1.getFields()) { docJavaFields.add(DocJavaField.builder().setComment(javaField.getComment()).setJavaField(javaField)); } fieldList.addAll(docJavaFields); @@ -197,7 +196,7 @@ public class JavaClassUtil { List javaClassList = new ArrayList<>(); List validates = DocValidatorAnnotationEnum.listValidatorAnnotations(); for (JavaAnnotation javaAnnotation : annotations) { - List annotationValueList = getAnnotationValues(validates,javaAnnotation); + List annotationValueList = getAnnotationValues(validates, javaAnnotation); addGroupClass(annotationValueList, javaClassList); } return javaClassList; @@ -205,6 +204,7 @@ public class JavaClassUtil { /** * Obtain Validate Group classes + * * @param javaAnnotation the annotation of controller method param * @return the group annotation value */ @@ -214,7 +214,7 @@ public class JavaClassUtil { } List javaClassList = new ArrayList<>(); List validates = DocValidatorAnnotationEnum.listValidatorAnnotations(); - List annotationValueList = getAnnotationValues(validates,javaAnnotation); + List annotationValueList = getAnnotationValues(validates, javaAnnotation); addGroupClass(annotationValueList, javaClassList); return javaClassList; } @@ -231,7 +231,7 @@ public class JavaClassUtil { } } - private static List getAnnotationValues(List validates,JavaAnnotation javaAnnotation){ + private static List getAnnotationValues(List validates, JavaAnnotation javaAnnotation) { List annotationValueList = null; String simpleName = javaAnnotation.getType().getSimpleName(); if (simpleName.equalsIgnoreCase(ValidatorAnnotations.VALIDATED)) {