Class MavenPlugin.ConfigurationBuilder
java.lang.Object
io.spring.initializr.generator.buildsystem.maven.MavenPlugin.ConfigurationBuilder
- Enclosing class:
- MavenPlugin
Builder for a
MavenPlugin.Configuration.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd the specified parameter with a single value.add(String name, Consumer<MavenPlugin.ConfigurationBuilder> consumer) Add the specified parameter with a nested structure.configure(String name, Consumer<MavenPlugin.ConfigurationBuilder> consumer) Configure the parameter with the specifiedname.
-
Constructor Details
-
ConfigurationBuilder
public ConfigurationBuilder()
-
-
Method Details
-
add
Add the specified parameter with a single value.- Parameters:
name- the name of the parametervalue- the single value of the parameter- Returns:
- this for method chaining
-
add
public MavenPlugin.ConfigurationBuilder add(String name, Consumer<MavenPlugin.ConfigurationBuilder> consumer) Add the specified parameter with a nested structure.- Parameters:
name- the name of the parameterconsumer- a consumer to further configure the parameter- Returns:
- this for method chaining
- See Also:
-
configure
public MavenPlugin.ConfigurationBuilder configure(String name, Consumer<MavenPlugin.ConfigurationBuilder> consumer) Configure the parameter with the specifiedname. If no parameter with that name exists, it is created. If the parameter already exists, the consumer can be used to further tune the nested structure.- Parameters:
name- the name of the parameterconsumer- a consumer to further configure the parameter- Returns:
- this for method chaining
- Throws:
IllegalArgumentException- if a parameter with the same name is registered with a single value- See Also:
-