Class DependencyContainer
java.lang.Object
io.spring.initializr.generator.buildsystem.BuildItemContainer<String,Dependency>
io.spring.initializr.generator.buildsystem.DependencyContainer
A
BuildItemContainer
implementation for dependencies.- Author:
- Stephane Nicoll
-
Constructor Summary
ConstructorsConstructorDescriptionDependencyContainer
(Function<String, Dependency> itemResolver) Create an instance with the specifieditemResolver
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(String id, Dependency.Builder<?> builder) void
add
(String id, String groupId, String artifactId, DependencyScope scope) Register aDependency
with the specifiedid
and a managed version.
-
Constructor Details
-
DependencyContainer
Create an instance with the specifieditemResolver
.- Parameters:
itemResolver
- the function that returns aDependency
based on an identifier.
-
-
Method Details
-
add
Register aDependency
with the specifiedid
and a managed version.- Parameters:
id
- the id of the dependencygroupId
- the groupIdartifactId
- the artifactIdscope
- theDependencyScope
-
add
- Parameters:
id
- the id of the dependencybuilder
- the state of the dependency
-