diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/MavenRepository.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/MavenRepository.java index c9ccf521c0..5778f19b0a 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/MavenRepository.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/MavenRepository.java @@ -45,6 +45,10 @@ public class MavenRepository { private final boolean snapshotsEnabled; + /** + * Creates a new instance. + * @param builder the builder to use + */ protected MavenRepository(Builder builder) { this.id = builder.id; this.name = builder.name; @@ -123,6 +127,9 @@ public int hashCode() { return Objects.hash(this.id, this.name, this.url, this.releasesEnabled, this.snapshotsEnabled); } + /** + * Builder for {@link MavenRepository}. + */ public static class Builder { private String id; @@ -135,6 +142,11 @@ public static class Builder { private boolean snapshotsEnabled; + /** + * Creates a new instance. + * @param id the id + * @param url the url + */ public Builder(String id, String url) { this.id = id; this.name = id; diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GradleExtension.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GradleExtension.java index 99903f6ade..b178e01616 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GradleExtension.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GradleExtension.java @@ -112,7 +112,7 @@ public Set getImportedTypes() { } /** - * A builder for {@link GradleExtension}. + * Builder for {@link GradleExtension}. */ public static class Builder { diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GradleTask.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GradleTask.java index f1e30e8c90..536edb6f7d 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GradleTask.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GradleTask.java @@ -97,7 +97,7 @@ public Map getNested() { } /** - * A builder for {@link GradleTask}. + * Builder for {@link GradleTask}. */ public static class Builder { @@ -111,6 +111,11 @@ public static class Builder { private final Map nested = new LinkedHashMap<>(); + /** + * Creates a new instance. + * @param name the name of the task + * @param type the type of the task + */ protected Builder(String name, String type) { this.name = name; this.type = type; diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GroovyDslGradleBuildWriter.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GroovyDslGradleBuildWriter.java index 5eb50d7410..5d643847f0 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GroovyDslGradleBuildWriter.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GroovyDslGradleBuildWriter.java @@ -119,6 +119,11 @@ protected void writeConfigurations(IndentingWriter writer, GradleConfigurationCo writer.println(""); } + /** + * Writes the given configuration. + * @param writer the writer to write to + * @param configuration the configuration to write + */ protected void writeConfiguration(IndentingWriter writer, GradleConfiguration configuration) { writer.println(configuration.getName() + " {"); writer.indented(() -> writer diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/Invocation.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/Invocation.java index b4d20136a2..38a91b7d04 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/Invocation.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/Invocation.java @@ -30,6 +30,11 @@ public class Invocation { private final List arguments; + /** + * Creates a new instance. + * @param target the target + * @param arguments the arguments + */ public Invocation(String target, List arguments) { this.target = target; this.arguments = List.copyOf(arguments); diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuild.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuild.java index 622524984e..db1cf10621 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuild.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuild.java @@ -47,11 +47,18 @@ public class MavenBuild extends Build { private final MavenProfileContainer profiles; + /** + * Creates a new instance. + * @param buildItemResolver the build item resolver + */ public MavenBuild(BuildItemResolver buildItemResolver) { super(buildItemResolver); this.profiles = new MavenProfileContainer(determineBuildItemResolver(buildItemResolver)); } + /** + * Creates a new instance. + */ public MavenBuild() { this(null); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuildSettings.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuildSettings.java index bdde438573..ab40848570 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuildSettings.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuildSettings.java @@ -59,6 +59,10 @@ public class MavenBuildSettings extends BuildSettings { private final boolean addOverrideIfEmpty; + /** + * Creates a new instance. + * @param builder the builder to use + */ protected MavenBuildSettings(Builder builder) { super(builder); this.parent = builder.parent; @@ -216,6 +220,9 @@ public static class Builder extends BuildSettings.Builder { private boolean addOverrideIfEmpty; + /** + * Creates a new instance. + */ public Builder() { } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDependency.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDependency.java index 87d8955f9b..df23161218 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDependency.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDependency.java @@ -25,8 +25,15 @@ */ public class MavenDependency extends Dependency { + /** + * Whether this dependency is optional. + */ protected final boolean optional; + /** + * Creates a new instance. + * @param builder the builder to use + */ protected MavenDependency(Builder builder) { super(builder); this.optional = builder.optional; @@ -69,6 +76,11 @@ public static class Builder extends Dependency.Builder { private boolean optional; + /** + * Creates a new instance. + * @param groupId the group id + * @param artifactId the artifact id + */ protected Builder(String groupId, String artifactId) { super(groupId, artifactId); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDeveloper.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDeveloper.java index 2215033314..7a8f65954c 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDeveloper.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDeveloper.java @@ -245,6 +245,10 @@ public Builder property(String key, String value) { return this; } + /** + * Builds the developer. + * @return the developer + */ public MavenDeveloper build() { return new MavenDeveloper(this); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDistributionManagement.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDistributionManagement.java index 58e75a2a86..0e82bae74a 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDistributionManagement.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenDistributionManagement.java @@ -44,6 +44,10 @@ public class MavenDistributionManagement { this.relocation = builder.relocation.build(); } + /** + * Returns whether this instance is empty. + * @return whether this instance is empty + */ public boolean isEmpty() { return this.downloadUrl == null && this.repository.isEmpty() && this.snapshotRepository.isEmpty() && this.site.isEmpty() && this.relocation.isEmpty(); @@ -92,17 +96,20 @@ public Relocation getRelocation() { return this.relocation; } + /** + * Builder for {@link MavenDistributionManagement}. + */ public static class Builder { private String downloadUrl; - private DeploymentRepository.Builder repository = new DeploymentRepository.Builder(); + private final DeploymentRepository.Builder repository = new DeploymentRepository.Builder(); - private DeploymentRepository.Builder snapshotRepository = new DeploymentRepository.Builder(); + private final DeploymentRepository.Builder snapshotRepository = new DeploymentRepository.Builder(); - private Site.Builder site = new Site.Builder(); + private final Site.Builder site = new Site.Builder(); - private Relocation.Builder relocation = new Relocation.Builder(); + private final Relocation.Builder relocation = new Relocation.Builder(); /** * Specify the URL where this project can be downloaded from. @@ -188,6 +195,10 @@ public static class DeploymentRepository { this.uniqueVersion = builder.uniqueVersion; } + /** + * Returns whether this instance is empty. + * @return whether this instance is empty + */ public boolean isEmpty() { return this.id == null && this.name == null && this.url == null && this.layout == null && this.uniqueVersion == null; @@ -234,6 +245,9 @@ public Boolean getUniqueVersion() { return this.uniqueVersion; } + /** + * Builder for {@link DeploymentRepository}. + */ public static class Builder { private String id; @@ -329,6 +343,10 @@ public static class Site { this.url = builder.url; } + /** + * Returns whether this instance is empty. + * @return whether this instance is empty + */ public boolean isEmpty() { return this.id == null && this.name == null && this.url == null; } @@ -357,6 +375,9 @@ public String getUrl() { return this.url; } + /** + * Builder for {@link Site}. + */ public static class Builder { private String id; @@ -429,6 +450,10 @@ public static class Relocation { this.message = builder.message; } + /** + * Returns whether this instance is empty. + * @return whether this instance is empty + */ public boolean isEmpty() { return this.groupId == null && this.artifactId == null && this.version == null && this.message == null; } @@ -465,6 +490,9 @@ public String getMessage() { return this.message; } + /** + * Builder for {@link Relocation}. + */ public static class Builder { private String groupId; diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenExtension.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenExtension.java index e9b306439f..80ca709952 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenExtension.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenExtension.java @@ -32,6 +32,10 @@ public class MavenExtension { private final VersionReference version; + /** + * Creates a new instance. + * @param builder the builder to use + */ protected MavenExtension(Builder builder) { this.groupId = builder.groupId; this.artifactId = builder.artifactId; @@ -72,6 +76,9 @@ public VersionReference getVersionReference() { return this.version; } + /** + * Builder for {@link MavenExtension}. + */ public static class Builder { private final String groupId; @@ -80,6 +87,11 @@ public static class Builder { private VersionReference version; + /** + * Creates a new instance. + * @param groupId the group id + * @param artifactId the artifact id + */ protected Builder(String groupId, String artifactId) { this.groupId = groupId; this.artifactId = artifactId; diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenLicense.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenLicense.java index 13e9db3bc6..98f6b6d763 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenLicense.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenLicense.java @@ -124,6 +124,10 @@ public Builder comments(String comments) { return this; } + /** + * Builds the license. + * @return the license + */ public MavenLicense build() { return new MavenLicense(this); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenPlugin.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenPlugin.java index 7b7a206104..4e22f019b1 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenPlugin.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenPlugin.java @@ -50,6 +50,10 @@ public class MavenPlugin { private final Configuration configuration; + /** + * Creates a new instance. + * @param builder the builder to use + */ protected MavenPlugin(Builder builder) { this.groupId = builder.groupId; this.artifactId = builder.artifactId; @@ -158,6 +162,11 @@ public static class Builder { private ConfigurationBuilder configurationBuilder; + /** + * Creates a new instance. + * @param groupId the group id + * @param artifactId the artifact id + */ protected Builder(String groupId, String artifactId) { this.groupId = groupId; this.artifactId = artifactId; @@ -279,6 +288,10 @@ public static class ExecutionBuilder { private ConfigurationBuilder configurationCustomization = null; + /** + * Creates a new instance. + * @param id the id + */ public ExecutionBuilder(String id) { this.id = id; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenProfile.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenProfile.java index f0e49c4182..7e2ae4de62 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenProfile.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenProfile.java @@ -57,6 +57,11 @@ public class MavenProfile { private final MavenDistributionManagement.Builder distributionManagement = new MavenDistributionManagement.Builder(); + /** + * Creates a new instance. + * @param id the id + * @param buildItemResolver the build item resolver + */ protected MavenProfile(String id, BuildItemResolver buildItemResolver) { this.id = id; this.dependencies = new DependencyContainer(buildItemResolver::resolveDependency); @@ -214,6 +219,9 @@ public static class SettingsBuilder { private String finalName; + /** + * Creates a new instance. + */ protected SettingsBuilder() { } @@ -241,6 +249,10 @@ public SettingsBuilder finalName(String finalName) { return this; } + /** + * Builds the settings. + * @return the settings + */ public Settings build() { return new Settings(this); } @@ -256,7 +268,11 @@ public static final class Settings { private final String finalName; - protected Settings(SettingsBuilder builder) { + /** + * Creates a new instance. + * @param builder the builder to use + */ + private Settings(SettingsBuilder builder) { this.defaultGoal = builder.defaultGoal; this.finalName = builder.finalName; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenProfileActivation.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenProfileActivation.java index ba5fe34490..9de42bd317 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenProfileActivation.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenProfileActivation.java @@ -33,6 +33,10 @@ public class MavenProfileActivation { private final File file; + /** + * Creates a new instance. + * @param builder the builder to use + */ protected MavenProfileActivation(Builder builder) { this.activeByDefault = builder.activeByDefault; this.jdk = builder.jdk; @@ -233,6 +237,9 @@ public static class Builder { private String fileMissing; + /** + * Creates a new instance. + */ protected Builder() { } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenResource.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenResource.java index 51b963f21c..a325b2444b 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenResource.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenResource.java @@ -37,6 +37,10 @@ public class MavenResource { private final List excludes; + /** + * Creates a new instance. + * @param builder the builder to use + */ public MavenResource(Builder builder) { this.directory = builder.directory; this.targetPath = builder.targetPath; @@ -105,6 +109,10 @@ public static class Builder { private List excludes = new ArrayList<>(); + /** + * Creates a new instance. + * @param directory the directory + */ public Builder(String directory) { this.directory = directory; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/AbstractLanguage.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/AbstractLanguage.java index b1e505e36a..5158333924 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/AbstractLanguage.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/AbstractLanguage.java @@ -29,6 +29,12 @@ public abstract class AbstractLanguage implements Language { private final String sourceFileExtension; + /** + * Creates a new instance. + * @param id the id + * @param jvmVersion the JVM version + * @param sourceFileExtension the source file extension + */ protected AbstractLanguage(String id, String jvmVersion, String sourceFileExtension) { this.id = id; this.jvmVersion = (jvmVersion != null) ? jvmVersion : DEFAULT_JVM_VERSION; diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/Annotation.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/Annotation.java index c12c447c59..b0e0bad4ef 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/Annotation.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/Annotation.java @@ -197,26 +197,50 @@ private Attribute(String name, AttributeType type, Object... values) { this.values = Arrays.asList(values); } + /** + * Return the attribute name. + * @return the attribute name + */ public String getName() { return this.name; } + /** + * Return the attribute type. + * @return the attribute type + */ public AttributeType getType() { return this.type; } + /** + * Return the values. + * @return the values + */ public List getValues() { return this.values; } } - private enum AttributeType { + /** + * Type of an attribute. + */ + public enum AttributeType { + /** + * Primitive type. + */ PRIMITIVE, + /** + * String type. + */ STRING, + /** + * Class type. + */ CLASS() { @Override protected Collection getImports(Object value) { @@ -230,6 +254,9 @@ else if (value instanceof ClassName name) { } }, + /** + * Enum type. + */ ENUM() { @Override protected Collection getImports(Object value) { @@ -240,6 +267,9 @@ protected Collection getImports(Object value) { } }, + /** + * Annotation type. + */ ANNOTATION() { @Override protected Collection getImports(Object value) { @@ -250,6 +280,9 @@ protected Collection getImports(Object value) { } }, + /** + * Code type. + */ CODE { @Override protected boolean isCompatible(AttributeType attributeType) { diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/Language.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/Language.java index 98b49808db..7cfa146bfd 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/Language.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/Language.java @@ -64,6 +64,13 @@ public interface Language { */ boolean isKeyword(String input); + /** + * Creates the language for the given id. + * @param id the id + * @param jvmVersion the JVM version + * @return the language + * @throws IllegalStateException if no language for this id can be found + */ static Language forId(String id, String jvmVersion) { return SpringFactoriesLoader.loadFactories(LanguageFactory.class, LanguageFactory.class.getClassLoader()) .stream() diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyFieldDeclaration.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyFieldDeclaration.java index 6f054a3988..084cd3394b 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyFieldDeclaration.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyFieldDeclaration.java @@ -46,6 +46,11 @@ private GroovyFieldDeclaration(Builder builder) { this.initialized = builder.initialized; } + /** + * Creates a new builder for the field with the given name. + * @param name the name + * @return the builder + */ public static Builder field(String name) { return new Builder(name); } @@ -55,26 +60,49 @@ public AnnotationContainer annotations() { return this.annotations; } + /** + * Return the modifiers. + * @return the modifiers + */ public int getModifiers() { return this.modifiers; } + /** + * Return the name. + * @return the name + */ public String getName() { return this.name; } + /** + * Return the return type. + * @return the return type + */ public String getReturnType() { return this.returnType; } + /** + * Return the value. + * @return the value + */ public Object getValue() { return this.value; } + /** + * Whether the field declaration is initialized. + * @return whether the field declaration is initialized + */ public boolean isInitialized() { return this.initialized; } + /** + * Builder for {@link GroovyFieldDeclaration}. + */ public static final class Builder { private final String name; @@ -91,17 +119,32 @@ private Builder(String name) { this.name = name; } + /** + * Sets the modifiers. + * @param modifiers the modifiers + * @return this for method chaining + */ public Builder modifiers(int modifiers) { this.modifiers = modifiers; return this; } + /** + * Sets the value. + * @param value the value + * @return this for method chaining + */ public Builder value(Object value) { this.value = value; this.initialized = true; return this; } + /** + * Sets the return type. + * @param returnType the return type + * @return the field + */ public GroovyFieldDeclaration returning(String returnType) { this.returnType = returnType; return new GroovyFieldDeclaration(this); diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyLanguage.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyLanguage.java index 90857172ff..e291805522 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyLanguage.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyLanguage.java @@ -41,10 +41,17 @@ public final class GroovyLanguage extends AbstractLanguage { */ public static final String ID = "groovy"; + /** + * Creates a new instance with the JVM version {@value #DEFAULT_JVM_VERSION}. + */ public GroovyLanguage() { this(DEFAULT_JVM_VERSION); } + /** + * Creates a new instance. + * @param jvmVersion the JVM version + */ public GroovyLanguage(String jvmVersion) { super(ID, jvmVersion, "groovy"); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyMethodDeclaration.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyMethodDeclaration.java index 28cd17fa80..b7213a12f8 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyMethodDeclaration.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyMethodDeclaration.java @@ -53,6 +53,11 @@ private GroovyMethodDeclaration(Builder builder, CodeBlock code) { this.code = code; } + /** + * Creates a new builder for the method with the given name. + * @param name the name + * @return the builder + */ public static Builder method(String name) { return new Builder(name); } @@ -99,21 +104,41 @@ private Builder(String name) { this.name = name; } + /** + * Sets the modifiers. + * @param modifiers the modifiers + * @return this for method chaining + */ public Builder modifiers(int modifiers) { this.modifiers = modifiers; return this; } + /** + * Sets the return type. + * @param returnType the return type + * @return this for method chaining + */ public Builder returning(String returnType) { this.returnType = returnType; return this; } + /** + * Sets the parameters. + * @param parameters the parameters + * @return this for method chaining + */ public Builder parameters(Parameter... parameters) { this.parameters = Arrays.asList(parameters); return this; } + /** + * Sets the body. + * @param code the code for the body + * @return the method for the body + */ public GroovyMethodDeclaration body(CodeBlock code) { return new GroovyMethodDeclaration(this, code); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCode.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCode.java index 07cb0e3cf9..ad2c12a909 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCode.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCode.java @@ -25,6 +25,9 @@ */ public class GroovySourceCode extends SourceCode { + /** + * Creates a new instance. + */ public GroovySourceCode() { super(GroovyCompilationUnit::new); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCodeWriter.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCodeWriter.java index 3b42179e0a..e25ca17960 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCodeWriter.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCodeWriter.java @@ -90,6 +90,10 @@ public class GroovySourceCodeWriter implements SourceCodeWriter getFieldDeclarations() { return this.fieldDeclarations; } + /** + * Adds the given method declaration. + * @param methodDeclaration the method declaration + */ public void addMethodDeclaration(GroovyMethodDeclaration methodDeclaration) { this.methodDeclarations.add(methodDeclaration); } + /** + * Returns the method declarations. + * @return the method declarations + */ public List getMethodDeclarations() { return this.methodDeclarations; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaFieldDeclaration.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaFieldDeclaration.java index 61f61858a2..b2ba47a0dd 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaFieldDeclaration.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaFieldDeclaration.java @@ -46,6 +46,11 @@ private JavaFieldDeclaration(Builder builder) { this.initialized = builder.initialized; } + /** + * Creates a new builder for the field with the given name. + * @param name the field name + * @return the builder + */ public static Builder field(String name) { return new Builder(name); } @@ -55,22 +60,42 @@ public AnnotationContainer annotations() { return this.annotations; } + /** + * Return the modifiers. + * @return the modifiers + */ public int getModifiers() { return this.modifiers; } + /** + * Return the name. + * @return the name + */ public String getName() { return this.name; } + /** + * Return the return type. + * @return the return type + */ public String getReturnType() { return this.returnType; } + /** + * Return the value. + * @return the value + */ public Object getValue() { return this.value; } + /** + * Return whether this field is initialized. + * @return whether the field is initialized. + */ public boolean isInitialized() { return this.initialized; } @@ -94,17 +119,32 @@ private Builder(String name) { this.name = name; } + /** + * Sets the modifiers. + * @param modifiers the modifiers + * @return this for method chaining + */ public Builder modifiers(int modifiers) { this.modifiers = modifiers; return this; } + /** + * Sets the value. + * @param value the value + * @return this for method chaining + */ public Builder value(Object value) { this.value = value; this.initialized = true; return this; } + /** + * Sets the return type. + * @param returnType the return type + * @return this for method chaining + */ public JavaFieldDeclaration returning(String returnType) { this.returnType = returnType; return new JavaFieldDeclaration(this); diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaLanguage.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaLanguage.java index 0f5d5c86ab..16056defab 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaLanguage.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaLanguage.java @@ -34,10 +34,17 @@ public final class JavaLanguage extends AbstractLanguage { */ public static final String ID = "java"; + /** + * Creates a new instance with the JVM version {@value #DEFAULT_JVM_VERSION}. + */ public JavaLanguage() { this(DEFAULT_JVM_VERSION); } + /** + * Creates a new instance. + * @param jvmVersion the JVM version + */ public JavaLanguage(String jvmVersion) { super(ID, jvmVersion, "java"); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaMethodDeclaration.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaMethodDeclaration.java index 4a97929553..41208b4249 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaMethodDeclaration.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaMethodDeclaration.java @@ -52,6 +52,11 @@ private JavaMethodDeclaration(Builder builder, CodeBlock code) { this.code = code; } + /** + * Creates a new builder for the method with the given name. + * @param name the name + * @return the builder + */ public static Builder method(String name) { return new Builder(name); } @@ -98,21 +103,41 @@ private Builder(String name) { this.name = name; } + /** + * Sets the modifiers. + * @param modifiers the modifiers + * @return this for method chaining + */ public Builder modifiers(int modifiers) { this.modifiers = modifiers; return this; } + /** + * Sets the return type. + * @param returnType the return type + * @return this for method chaining + */ public Builder returning(String returnType) { this.returnType = returnType; return this; } + /** + * Sets the parameters. + * @param parameters the parameters + * @return this for method chaining + */ public Builder parameters(Parameter... parameters) { this.parameters = Arrays.asList(parameters); return this; } + /** + * Sets the body. + * @param code the code for the body + * @return the method containing the body + */ public JavaMethodDeclaration body(CodeBlock code) { return new JavaMethodDeclaration(this, code); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCode.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCode.java index 58f279bb65..48cfb3ad5e 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCode.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCode.java @@ -25,6 +25,9 @@ */ public class JavaSourceCode extends SourceCode { + /** + * Creates a new instance. + */ public JavaSourceCode() { super(JavaCompilationUnit::new); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCodeWriter.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCodeWriter.java index 7a95891142..f57c91c660 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCodeWriter.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCodeWriter.java @@ -86,6 +86,10 @@ public class JavaSourceCodeWriter implements SourceCodeWriter { private final IndentingWriterFactory indentingWriterFactory; + /** + * Creates a new instance. + * @param indentingWriterFactory the {@link IndentingWriterFactory} to use + */ public JavaSourceCodeWriter(IndentingWriterFactory indentingWriterFactory) { this.indentingWriterFactory = indentingWriterFactory; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaTypeDeclaration.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaTypeDeclaration.java index b4089753b8..27a62e311a 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaTypeDeclaration.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaTypeDeclaration.java @@ -39,26 +39,50 @@ public class JavaTypeDeclaration extends TypeDeclaration { super(name); } + /** + * Sets the modifiers. + * @param modifiers the modifiers + */ public void modifiers(int modifiers) { this.modifiers = modifiers; } + /** + * Return the modifiers. + * @return the modifiers + */ public int getModifiers() { return this.modifiers; } + /** + * Adds the given field declaration. + * @param fieldDeclaration the field declaration + */ public void addFieldDeclaration(JavaFieldDeclaration fieldDeclaration) { this.fieldDeclarations.add(fieldDeclaration); } + /** + * Returns the field declarations. + * @return the field declarations + */ public List getFieldDeclarations() { return this.fieldDeclarations; } + /** + * Adds the given method declaration. + * @param methodDeclaration the method declaration + */ public void addMethodDeclaration(JavaMethodDeclaration methodDeclaration) { this.methodDeclarations.add(methodDeclaration); } + /** + * Returns the method declarations. + * @return the method declarations + */ public List getMethodDeclarations() { return this.methodDeclarations; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinCompilationUnit.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinCompilationUnit.java index 551fb5b244..d3aa781e38 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinCompilationUnit.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinCompilationUnit.java @@ -39,10 +39,18 @@ protected KotlinTypeDeclaration doCreateTypeDeclaration(String name) { return new KotlinTypeDeclaration(name); } + /** + * Adds the given function as a top level function. + * @param function the function to add + */ public void addTopLevelFunction(KotlinFunctionDeclaration function) { this.topLevelFunctions.add(function); } + /** + * Returns the top level functions. + * @return the top level functions + */ public List getTopLevelFunctions() { return this.topLevelFunctions; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinFunctionDeclaration.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinFunctionDeclaration.java index 5e4371ecaa..a174f10651 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinFunctionDeclaration.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinFunctionDeclaration.java @@ -52,6 +52,11 @@ private KotlinFunctionDeclaration(Builder builder, CodeBlock code) { this.code = code; } + /** + * Creates a new builder for the function with the given name. + * @param name the name + * @return the builder + */ public static Builder function(String name) { return new Builder(name); } @@ -98,21 +103,41 @@ private Builder(String name) { this.name = name; } + /** + * Sets the modifiers. + * @param modifiers the modifiers + * @return this for method chaining + */ public Builder modifiers(KotlinModifier... modifiers) { this.modifiers = Arrays.asList(modifiers); return this; } + /** + * Sets the return type. + * @param returnType the return type + * @return this for method chaining + */ public Builder returning(String returnType) { this.returnType = returnType; return this; } + /** + * Sets the parameters. + * @param parameters the parameters + * @return this for method chaining + */ public Builder parameters(Parameter... parameters) { this.parameters = Arrays.asList(parameters); return this; } + /** + * Sets the body. + * @param code the code for the body + * @return the function declaration containing the body + */ public KotlinFunctionDeclaration body(CodeBlock code) { return new KotlinFunctionDeclaration(this, code); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinLanguage.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinLanguage.java index 4c2dade3a7..0fff3dbb54 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinLanguage.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinLanguage.java @@ -41,10 +41,17 @@ public final class KotlinLanguage extends AbstractLanguage { */ public static final String ID = "kotlin"; + /** + * Creates a new instance with the JVM version {@value #DEFAULT_JVM_VERSION}. + */ public KotlinLanguage() { this(DEFAULT_JVM_VERSION); } + /** + * Creates a new instance. + * @param jvmVersion the JVM version + */ public KotlinLanguage(String jvmVersion) { super(ID, jvmVersion, "kt"); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinPropertyDeclaration.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinPropertyDeclaration.java index b8fa815652..e37a9a3b30 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinPropertyDeclaration.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinPropertyDeclaration.java @@ -60,10 +60,20 @@ private KotlinPropertyDeclaration(Builder builder) { this.setter = builder.setter; } + /** + * Returns a builder for a {@code val} property with the given name. + * @param name the name + * @return the builder + */ public static ValBuilder val(String name) { return new ValBuilder(name); } + /** + * Returns a builder for a {@code var} property with the given name. + * @param name the name + * @return the builder + */ public static VarBuilder var(String name) { return new VarBuilder(name); } @@ -80,6 +90,10 @@ String getReturnType() { return this.returnType; } + /** + * Returns the modifiers. + * @return the modifiers + */ public List getModifiers() { return this.modifiers; } @@ -127,32 +141,63 @@ private Builder(String name, boolean isVal) { this.isVal = isVal; } + /** + * Returns {@code this} instance. + * @return this instance + */ protected abstract T self(); + /** + * Returns the getter. + * @return the getter + */ @SuppressWarnings("unchecked") public AccessorBuilder getter() { return new AccessorBuilder<>((T) this, (created) -> this.getter = created); } + /** + * Returns the setter. + * @return setter + */ @SuppressWarnings("unchecked") public AccessorBuilder setter() { return new AccessorBuilder<>((T) this, (created) -> this.setter = created); } + /** + * Sets the return type. + * @param returnType the return type + * @return this for method chaining + */ public T returning(String returnType) { this.returnType = returnType; return self(); } + /** + * Sets the modifiers. + * @param modifiers the modifiers + * @return this for method chaining + */ public T modifiers(KotlinModifier... modifiers) { this.modifiers = Arrays.asList(modifiers); return self(); } + /** + * Sets no value. + * @return the property declaration + */ public KotlinPropertyDeclaration emptyValue() { return new KotlinPropertyDeclaration(this); } + /** + * Sets the given value. + * @param valueCode the code for the value + * @return the property declaration + */ public KotlinPropertyDeclaration value(CodeBlock valueCode) { this.valueCode = valueCode; return new KotlinPropertyDeclaration(this); @@ -160,6 +205,9 @@ public KotlinPropertyDeclaration value(CodeBlock valueCode) { } + /** + * Builder for {@code val} properties. + */ public static final class ValBuilder extends Builder { private ValBuilder(String name) { @@ -173,12 +221,19 @@ protected ValBuilder self() { } + /** + * Builder for {@code val} properties. + */ public static final class VarBuilder extends Builder { private VarBuilder(String name) { super(name, false); } + /** + * Sets no value. + * @return the property declaration + */ public KotlinPropertyDeclaration empty() { return new KotlinPropertyDeclaration(this); } @@ -190,6 +245,11 @@ protected VarBuilder self() { } + /** + * Builder for a property accessor. + * + * @param the type of builder + */ public static final class AccessorBuilder> { private final AnnotationContainer annotations = new AnnotationContainer(); @@ -205,20 +265,40 @@ private AccessorBuilder(T parent, Consumer accessorFunction) { this.accessorFunction = accessorFunction; } + /** + * Adds an annotation. + * @param className the class name of the annotation + * @return this for method chaining + */ public AccessorBuilder withAnnotation(ClassName className) { return withAnnotation(className, null); } + /** + * Adds an annotation. + * @param className the class name of the annotation + * @param annotation configurer for the annotation + * @return this for method chaining + */ public AccessorBuilder withAnnotation(ClassName className, Consumer annotation) { this.annotations.add(className, annotation); return this; } + /** + * Sets the body. + * @param code the code for the body + * @return this for method chaining + */ public AccessorBuilder withBody(CodeBlock code) { this.code = code; return this; } + /** + * Builds the accessor. + * @return the parent getter / setter + */ public T buildAccessor() { this.accessorFunction.accept(new Accessor(this)); return this.parent; diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCode.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCode.java index 380dc83572..0d05662769 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCode.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCode.java @@ -25,6 +25,9 @@ */ public class KotlinSourceCode extends SourceCode { + /** + * Creates a new instance. + */ public KotlinSourceCode() { super(KotlinCompilationUnit::new); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCodeWriter.java b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCodeWriter.java index e7def73772..34a0d9d156 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCodeWriter.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCodeWriter.java @@ -60,6 +60,11 @@ public class KotlinSourceCodeWriter implements SourceCodeWriter getModifiers() { return this.modifiers; } + /** + * Adds a property declaration. + * @param propertyDeclaration the property declaration + */ public void addPropertyDeclaration(KotlinPropertyDeclaration propertyDeclaration) { this.propertyDeclarations.add(propertyDeclaration); } + /** + * Returns the property declarations. + * @return the property declaration + */ public List getPropertyDeclarations() { return this.propertyDeclarations; } + /** + * Adds the function declaration. + * @param methodDeclaration the function declaration + */ public void addFunctionDeclaration(KotlinFunctionDeclaration methodDeclaration) { this.functionDeclarations.add(methodDeclaration); } + /** + * Returns the function declarations. + * @return the function declarations + */ public List getFunctionDeclarations() { return this.functionDeclarations; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/Packaging.java b/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/Packaging.java index 9774531a56..71e4f27787 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/Packaging.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/Packaging.java @@ -27,8 +27,18 @@ */ public interface Packaging { + /** + * Return the id of the packaging. + * @return the id + */ String id(); + /** + * Creates the packaging for the given id. + * @param id the id + * @return the packaging + * @throws IllegalStateException if the packaging with the given id can't be found + */ static Packaging forId(String id) { return SpringFactoriesLoader.loadFactories(PackagingFactory.class, Packaging.class.getClassLoader()) .stream() diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/project/MutableProjectDescription.java b/initializr-generator/src/main/java/io/spring/initializr/generator/project/MutableProjectDescription.java index 958ae56ae1..6b6f74adcc 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/project/MutableProjectDescription.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/project/MutableProjectDescription.java @@ -61,6 +61,9 @@ public class MutableProjectDescription implements ProjectDescription { private String baseDirectory; + /** + * Creates a new instance. + */ public MutableProjectDescription() { } @@ -94,6 +97,10 @@ public Version getPlatformVersion() { return this.platformVersion; } + /** + * Sets the platform version. + * @param platformVersion the platform version + */ public void setPlatformVersion(Version platformVersion) { this.platformVersion = platformVersion; } @@ -103,6 +110,10 @@ public BuildSystem getBuildSystem() { return this.buildSystem; } + /** + * Sets the build system. + * @param buildSystem the build system + */ public void setBuildSystem(BuildSystem buildSystem) { this.buildSystem = buildSystem; } @@ -112,6 +123,10 @@ public Packaging getPackaging() { return this.packaging; } + /** + * Sets the packaging. + * @param packaging the packaging + */ public void setPackaging(Packaging packaging) { this.packaging = packaging; } @@ -121,18 +136,39 @@ public Language getLanguage() { return this.language; } + /** + * Sets the language. + * @param language the language + */ public void setLanguage(Language language) { this.language = language; } + /** + * Adds the given dependency. + * @param id the id + * @param dependency the dependency + * @return the added dependency + */ public Dependency addDependency(String id, Dependency dependency) { return this.requestedDependencies.put(id, dependency); } + /** + * Adds the given dependency. + * @param id the id + * @param builder the dependency builder + * @return the added dependency + */ public Dependency addDependency(String id, Dependency.Builder builder) { return addDependency(id, builder.build()); } + /** + * Removes the dependency with the given id. + * @param id the id + * @return the removed dependency + */ public Dependency removeDependency(String id) { return this.requestedDependencies.remove(id); } @@ -147,6 +183,10 @@ public String getGroupId() { return this.groupId; } + /** + * Sets the group id. + * @param groupId the group id + */ public void setGroupId(String groupId) { this.groupId = groupId; } @@ -156,6 +196,10 @@ public String getArtifactId() { return this.artifactId; } + /** + * Sets the artifact id. + * @param artifactId the artifact id + */ public void setArtifactId(String artifactId) { this.artifactId = artifactId; } @@ -165,6 +209,10 @@ public String getVersion() { return this.version; } + /** + * Sets the version. + * @param version the version + */ public void setVersion(String version) { this.version = version; } @@ -174,6 +222,10 @@ public String getName() { return this.name; } + /** + * Sets the name. + * @param name the name + */ public void setName(String name) { this.name = name; } @@ -183,6 +235,10 @@ public String getDescription() { return this.description; } + /** + * Sets the description. + * @param description the description + */ public void setDescription(String description) { this.description = description; } @@ -192,6 +248,10 @@ public String getApplicationName() { return this.applicationName; } + /** + * Sets the application name. + * @param applicationName the application name + */ public void setApplicationName(String applicationName) { this.applicationName = applicationName; } @@ -207,6 +267,10 @@ public String getPackageName() { return null; } + /** + * Sets the package name. + * @param packageName the package name + */ public void setPackageName(String packageName) { this.packageName = packageName; } @@ -216,6 +280,10 @@ public String getBaseDirectory() { return this.baseDirectory; } + /** + * Sets the base directory. + * @param baseDirectory the base directory + */ public void setBaseDirectory(String baseDirectory) { this.baseDirectory = baseDirectory; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/version/InvalidVersionException.java b/initializr-generator/src/main/java/io/spring/initializr/generator/version/InvalidVersionException.java index 684b9e2902..a9b43c32cc 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/version/InvalidVersionException.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/version/InvalidVersionException.java @@ -24,10 +24,19 @@ @SuppressWarnings("serial") public class InvalidVersionException extends RuntimeException { + /** + * Creates a new instance. + * @param message the message + * @param cause the cause + */ public InvalidVersionException(String message, Throwable cause) { super(message, cause); } + /** + * Creates a new instance. + * @param message the message + */ public InvalidVersionException(String message) { super(message); }