Skip to content

Commit e95d506

Browse files
authored
Fix javadoc (#586)
* fix(javadoc): incosistencies * fix: javadoc config options
1 parent f51d553 commit e95d506

15 files changed

Lines changed: 54 additions & 35 deletions

File tree

adapters/source/src/main/java/io/sundr/adapter/source/utils/Sources.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class Sources {
4444
* Read the first {@link TypeDef} instance from an {@link InputStream}.
4545
*
4646
* @param path the {@link Path}
47+
* @param ctx the {@link AdapterContext}
4748
* @return the first {@link TypeDef} instance, or throw an exception if none is found.
4849
*/
4950
public static TypeDef readTypeDefFromPath(Path path, AdapterContext ctx) {
@@ -58,6 +59,7 @@ public static TypeDef readTypeDefFromPath(Path path, AdapterContext ctx) {
5859
* Read the first {@link TypeDef} instance from an {@link InputStream}.
5960
*
6061
* @param is the {@link InputStream}
62+
* @param ctx the {@link AdapterContext}
6163
* @return the first {@link TypeDef} instance, or throw an exception if none is found.
6264
*/
6365
public static TypeDef readTypeDefFromStream(InputStream is, AdapterContext ctx) {
@@ -68,6 +70,7 @@ public static TypeDef readTypeDefFromStream(InputStream is, AdapterContext ctx)
6870
* Read a {@link List} of {@link TypeDef} instances from an {@link InputStream}.
6971
*
7072
* @param is the {@link InputStream}
73+
* @param ctx the {@link AdapterContext}
7174
* @return a {@link List} of {@link TypeDef} instances.
7275
*/
7376
public static List<TypeDef> readTypeDefsFromStream(InputStream is, AdapterContext ctx) {
@@ -99,7 +102,7 @@ public static TypeDeclaration<?> readTypeFromStream(InputStream is) {
99102
/**
100103
* Read a {@link List} of {@link TypeDeclaration} instances from a classpath resource.
101104
*
102-
* @param resourceName the {@link InputStream}
105+
* @param resourceName the classpath resource name
103106
* @return a {@link List} of {@link TypeDeclaration} instances.
104107
*/
105108
public static List<TypeDeclaration<?>> readTypesFromResource(String resourceName) {
@@ -110,7 +113,7 @@ public static List<TypeDeclaration<?>> readTypesFromResource(String resourceName
110113
/**
111114
* Read a {@link TypeDeclaration} instance from a classpath resource.
112115
*
113-
* @param resourceName the {@link InputStream}
116+
* @param resourceName the classpath resource name
114117
* @return the {@link TypeDeclaration} instance.
115118
*/
116119
public static TypeDeclaration<?> readTypeFromResource(String resourceName) {
@@ -120,7 +123,7 @@ public static TypeDeclaration<?> readTypeFromResource(String resourceName) {
120123
/**
121124
* Read the first {@link TypeDef} instance from a classpath resource.
122125
*
123-
* @param resourceName the {@link InputStream}
126+
* @param resourceName the classpath resource name
124127
* @param ctx the {@link AdapterContext}
125128
* @return the first {@link TypeDef} instance, or throw an exception if none is found.
126129
*/
@@ -132,7 +135,8 @@ public static TypeDef readTypeDefFromResource(String resourceName, AdapterContex
132135
/**
133136
* Read a {@link List} of {@link TypeDef} instances from a classpath resource.
134137
*
135-
* @param resourceName the {@link InputStream}
138+
* @param resourceName the resource name
139+
* @param ctx the {@link AdapterContext}
136140
* @return a {@link List} of {@link TypeDef} instances.
137141
*/
138142
public static List<TypeDef> readTypeDefsFromResource(String resourceName, AdapterContext ctx) {

annotations/builder/src/main/java/io/sundr/builder/internal/functions/Construct.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private String usingConstructor(List<String> item) {
8787
/**
8888
* Checks that a constructor with the required number of arguments is found.
8989
*
90-
* @param arguments
90+
* @param arguments The expected number of constructor arguments.
9191
*/
9292
private void checkConstructorArguments(int arguments) {
9393
if (arguments == 0 && (typeDef.getConstructors() == null || typeDef.getConstructors().isEmpty())) {
@@ -108,7 +108,7 @@ private void checkConstructorArguments(int arguments) {
108108
/**
109109
* Checks that a factory method with the required number of arguments is found.
110110
*
111-
* @param arguments
111+
* @param arguments The expected number of factory method arguments.
112112
*/
113113
private void checkFactoryMethodArguments(int arguments) {
114114
for (Method m : typeDef.getMethods()) {

annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToConstructExpression.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private Expression usingConstructor(List<Expression> item) {
8888
/**
8989
* Checks that a constructor with the required number of arguments is found.
9090
*
91-
* @param arguments
91+
* @param arguments The expected number of constructor arguments.
9292
*/
9393
private void checkConstructorArguments(int arguments) {
9494
if (arguments == 0 && (typeDef.getConstructors() == null || typeDef.getConstructors().isEmpty())) {
@@ -109,7 +109,7 @@ private void checkConstructorArguments(int arguments) {
109109
/**
110110
* Checks that a factory method with the required number of arguments is found.
111111
*
112-
* @param arguments
112+
* @param arguments The expected number of factory method arguments.
113113
*/
114114
private void checkFactoryMethodArguments(int arguments) {
115115
for (Method m : typeDef.getMethods()) {

annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ private static String relativePackage(String pkg, String relativePath) {
774774
* @param source The source type of the reference..
775775
* @param target The target type.
776776
* @param targetBuilder The target type builder.
777-
* @return
777+
* @return The string representation of the converted reference.
778778
*/
779779
private static String convertReference(String ref, TypeDef source, TypeDef target, TypeDef targetBuilder) {
780780
StringBuilder sb = new StringBuilder();
@@ -788,7 +788,7 @@ private static String convertReference(String ref, TypeDef source, TypeDef targe
788788
* @param ref The ref.
789789
* @param source The source type of the reference..
790790
* @param target The target type.
791-
* @return
791+
* @return The string representation of the converted reference.
792792
*/
793793
private static String convertReference(String ref, TypeDef source, TypeDef target) {
794794
Method ctor = BuilderUtils.findBuildableConstructor(target);
@@ -1047,7 +1047,7 @@ private static String readAnnotationField(String ref, TypeDef source, Field fiel
10471047
* @param source The source type of the reference (e.g. the annotation).
10481048
* @param target The target type (e.g. the generated pojo).
10491049
* @param targetBuilder The target type builder (e.g. the pojo builder.
1050-
* @return
1050+
* @return The string representation of the converted map.
10511051
*/
10521052
private static String convertMap(String ref, TypeDef source, TypeDef target, TypeDef targetBuilder) {
10531053
StringBuilder sb = new StringBuilder();
@@ -1065,7 +1065,7 @@ private static Expression convertMapExpression(Expression expression, TypeDef ta
10651065
* @param ref The ref.
10661066
* @param source The source type of the reference (e.g. the annotation).
10671067
* @param target The target type (e.g. the generated pojo).
1068-
* @return
1068+
* @return The string representation of the converted map.
10691069
*/
10701070
private static String convertMap(String ref, TypeDef source, TypeDef target) {
10711071
Method ctor = BuilderUtils.findBuildableConstructor(target);
@@ -1090,7 +1090,7 @@ private static Expression convertMapExpression(Expression expression, TypeDef ta
10901090
*
10911091
* @param ref The reference.
10921092
* @param source The type of the reference.
1093-
* @param field The field to read.
1093+
* @param argument The argument to read.
10941094
* @return The code.
10951095
*/
10961096
private static String readMapValue(String ref, TypeDef source, Argument argument) {

annotations/builder/src/main/java/io/sundr/builder/internal/utils/BuilderUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ private static boolean hasBuildableAnnotation(Method method) {
272272
* Checks if method has a specific argument.
273273
*
274274
* @param method The method.
275-
* @param property The argument.
275+
* @param variable The argument.
276276
* @return True if matching argument if found.
277277
*/
278278
public static boolean methodHasArgument(Method method, Variable<?> variable) {
@@ -590,7 +590,7 @@ public static String qualifyPropertyName(Field field, TypeRef typeRef, TypeDef o
590590
* @param field The property.
591591
* @param typeRef The type reference.
592592
* @param originType The origin type.
593-
* param useSingular Flag to use singular form
593+
* @param useSingular Flag to use singular form.
594594
* @return The qualified property name.
595595
*/
596596
public static String qualifyPropertyName(Field field, TypeRef typeRef, TypeDef originType, boolean useSingular) {

annotations/transform/src/main/java/io/sundr/transform/annotations/AnnotationSelector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
/**
3030
* The annotation class to use for selecting classes.
3131
*
32-
* @return
32+
* @return The annotation class.
3333
*/
3434
Class<? extends Annotation> value();
3535

3636
/**
3737
* The package selector to use to filter selected annotated classes.
3838
*
39-
* @return
39+
* @return The package selectors.
4040
*/
4141
PackageSelector[] packages() default {};
4242
}

annotations/transform/src/main/java/io/sundr/transform/annotations/PackageSelector.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
/**
2929
* The package to use for selecting classes.
3030
*
31-
* @return
31+
* @return The package name.
3232
*/
3333
String value();
3434

3535
/**
36+
* The pattern used to filter class names within the package.
3637
*
37-
* @return
38+
* @return The class name pattern.
3839
*/
3940
String pattern() default "[a-zA-Z_$][a-zA-Z0-9_$]*";
4041
}

annotations/transform/src/main/java/io/sundr/transform/annotations/ResourceSelector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
public @interface ResourceSelector {
2727

2828
/**
29-
* The package to use for selecting classes.
29+
* The resource name to use for selecting classes.
3030
*
31-
* @return
31+
* @return The resource name.
3232
*/
3333
String value();
3434
}

core/src/main/java/io/sundr/functions/Pluralize.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public String apply(String word) {
8888
* Rudimentary implementation of checking whether word is plural or not.
8989
* It can be further improved to handle complex cases.
9090
*
91-
* @param word
91+
* @param word The word to check.
9292
* @return Boolean value indicating whether it's already plural or not
9393
*/
9494
private boolean isAlreadyPlural(String word) {

maven-plugin/src/main/java/io/sundr/maven/GenerateBomMojo.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ private void build(MavenSession session, MavenProject project, List<MavenProject
405405
/**
406406
* Returns all the session/reactor artifacts topologically sorted.
407407
*
408-
* @return
408+
* @return The sorted set of session artifacts.
409409
*/
410410
private Set<Artifact> getSessionArtifacts() {
411411
Set<Artifact> result = new LinkedHashSet<Artifact>();
@@ -418,7 +418,7 @@ private Set<Artifact> getSessionArtifacts() {
418418
/**
419419
* Returns all dependency artifacts in all modules, excluding all reactor artifacts (including attached).
420420
*
421-
* @return
421+
* @return The set of project dependency artifacts.
422422
*/
423423
private Set<Artifact> getProjectDependencies() {
424424
Set<Artifact> result = new LinkedHashSet<Artifact>();
@@ -433,7 +433,7 @@ private Set<Artifact> getProjectDependencies() {
433433
/**
434434
* Returns all dependencies defined in dependency management of the root pom.
435435
*
436-
* @return
436+
* @return The set of dependency management artifacts.
437437
*/
438438
private Set<Artifact> getProjectDependencyManagement() {
439439
Set<Artifact> result = new LinkedHashSet<Artifact>();
@@ -447,9 +447,9 @@ private Set<Artifact> getProjectDependencyManagement() {
447447
}
448448

449449
/**
450-
* Returns all dependencies defined in dependency management of the root pom.
450+
* Returns all plugin management entries defined in the root pom.
451451
*
452-
* @return
452+
* @return The set of plugin management artifacts.
453453
*/
454454
private Set<Artifact> getProjectPluginManagement() {
455455
Set<Artifact> result = new LinkedHashSet<Artifact>();
@@ -466,8 +466,8 @@ private Set<Artifact> getProjectPluginManagement() {
466466
* Collects dependencies, including transitives.
467467
* Project dependencies retain their scope, while test only dependencies (including transitives) will have test scope.
468468
*
469-
* @param projectDependencies
470-
* @return
469+
* @param projectDependencies The direct project dependencies to resolve transitives from.
470+
* @return The full set of artifacts including transitives.
471471
*/
472472
private Set<Artifact> getDependencies(final Set<Artifact> projectDependencies) {
473473
Set<Artifact> result = new LinkedHashSet<Artifact>(projectDependencies);

0 commit comments

Comments
 (0)