diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/Build.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/Build.java index 4a30ac66..b5b95a57 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/Build.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/Build.java @@ -64,25 +64,46 @@ public abstract class Build { public abstract BuildSettings getSettings(); /** - * Return the {@link PropertyContainer properties container} of this build. - * @return the properties container of this build. + * Return the {@linkplain PropertyContainer property container} to use to configure + * properties. + * @return the {@link PropertyContainer} */ public PropertyContainer properties() { return this.properties; } + /** + * Return the {@linkplain DependencyContainer dependency container} to use to + * configure dependencies. + * @return the {@link DependencyContainer} + */ public DependencyContainer dependencies() { return this.dependencies; } + /** + * Return the {@linkplain BomContainer bom container} to use to configure Bill of + * Materials. + * @return the {@link BomContainer} + */ public BomContainer boms() { return this.boms; } + /** + * Return the {@linkplain MavenRepositoryContainer repository container} to use to + * configure repositories. + * @return the {@link MavenRepositoryContainer} for repositories + */ public MavenRepositoryContainer repositories() { return this.repositories; } + /** + * Return the {@linkplain MavenRepositoryContainer repository container} to use to + * configure plugin repositories. + * @return the {@link MavenRepositoryContainer} for plugin repositories + */ public MavenRepositoryContainer pluginRepositories() { return this.pluginRepositories; } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/BuildSettings.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/BuildSettings.java index 086beda2..bf2380ef 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/BuildSettings.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/BuildSettings.java @@ -75,16 +75,31 @@ public class BuildSettings { protected Builder() { } + /** + * Set the group ID of the project. + * @param group the group ID + * @return this for method chaining + */ public B group(String group) { this.group = group; return self(); } + /** + * Set the artifact ID of the project. + * @param artifact the artifact ID + * @return this for method chaining + */ public B artifact(String artifact) { this.artifact = artifact; return self(); } + /** + * Set the version of the project. + * @param version the version + * @return this for method chaining + */ public B version(String version) { this.version = version; return self(); @@ -95,6 +110,10 @@ public class BuildSettings { return (B) this; } + /** + * Build a {@link BuildSettings} with the current state of this builder. + * @return a {@link BuildSettings} + */ public BuildSettings build() { return new BuildSettings(this); } diff --git a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/Dependency.java b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/Dependency.java index a7e1af0e..4e8964cf 100644 --- a/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/Dependency.java +++ b/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/Dependency.java @@ -54,10 +54,22 @@ public class Dependency { this.exclusions = new LinkedHashSet<>(builder.exclusions); } + /** + * Initialize a new dependency {@link Builder} with the specified coordinates. + * @param groupId the group ID of the dependency + * @param artifactId the artifact ID of the dependency + * @return a new builder + */ public static Builder withCoordinates(String groupId, String artifactId) { return new Builder(groupId, artifactId); } + /** + * Initialize a new dependency {@link Builder} with the state of the specified + * {@link Dependency}. + * @param dependency the dependency to use to initialize the builder + * @return a new builder initialized with the same state as the {@code dependency} + */ public static Builder from(Dependency dependency) { return new Builder(dependency.getGroupId(), dependency.getArtifactId()).initialize(dependency); } @@ -183,6 +195,10 @@ public class Dependency { return self(); } + /** + * Build a {@link Dependency} with the current state of this builder. + * @return a {@link Dependency} + */ public Dependency build() { return new Dependency(this); }