Class MutableProjectDescription
java.lang.Object
io.spring.initializr.generator.project.MutableProjectDescription
- All Implemented Interfaces:
ProjectDescription
A mutable implementation of
ProjectDescription
.- Author:
- Andy Wilkinson
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Create a new instance with the state of the specifiedsource
. -
Method Summary
Modifier and TypeMethodDescriptionaddDependency
(String id, Dependency dependency) addDependency
(String id, Dependency.Builder<?> builder) Create a full copy of this description so that any additional changes made on this instance are not reflected on the returned copy.Return the name of the application as a standard Java identifier.Return the buildartifactId
.Return the base directory of the project ornull
to use the root directory.Return theBuildSystem
to use.Return a human-readable description of the project.Return the buildgroupId
.Return the primaryLanguage
of the project.getName()
Return a simple name for the project.Return the root package name of the project.Return the buildPackaging
to use.Return the requested platformVersion
.Return an immutable mapping of requesteddependencies
.Return the version of the project.void
setApplicationName
(String applicationName) void
setArtifactId
(String artifactId) void
setBaseDirectory
(String baseDirectory) void
setBuildSystem
(BuildSystem buildSystem) void
setDescription
(String description) void
setGroupId
(String groupId) void
setLanguage
(Language language) void
void
setPackageName
(String packageName) void
setPackaging
(Packaging packaging) void
setPlatformVersion
(Version platformVersion) void
setVersion
(String version)
-
Constructor Details
-
MutableProjectDescription
public MutableProjectDescription() -
MutableProjectDescription
Create a new instance with the state of the specifiedsource
.- Parameters:
source
- the source description to initialize this instance with
-
-
Method Details
-
createCopy
Description copied from interface:ProjectDescription
Create a full copy of this description so that any additional changes made on this instance are not reflected on the returned copy.- Specified by:
createCopy
in interfaceProjectDescription
- Returns:
- a clone of this instance
-
getPlatformVersion
Description copied from interface:ProjectDescription
Return the requested platformVersion
.- Specified by:
getPlatformVersion
in interfaceProjectDescription
- Returns:
- the requested platform version or
null
-
setPlatformVersion
-
getBuildSystem
Description copied from interface:ProjectDescription
Return theBuildSystem
to use.- Specified by:
getBuildSystem
in interfaceProjectDescription
- Returns:
- the build system or
null
-
setBuildSystem
-
getPackaging
Description copied from interface:ProjectDescription
Return the buildPackaging
to use.- Specified by:
getPackaging
in interfaceProjectDescription
- Returns:
- the build packaging or
null
-
setPackaging
-
getLanguage
Description copied from interface:ProjectDescription
Return the primaryLanguage
of the project.- Specified by:
getLanguage
in interfaceProjectDescription
- Returns:
- the primary language or
null
-
setLanguage
-
addDependency
-
addDependency
-
removeDependency
-
getRequestedDependencies
Description copied from interface:ProjectDescription
Return an immutable mapping of requesteddependencies
.- Specified by:
getRequestedDependencies
in interfaceProjectDescription
- Returns:
- the requested dependencies
-
getGroupId
Description copied from interface:ProjectDescription
Return the buildgroupId
.- Specified by:
getGroupId
in interfaceProjectDescription
- Returns:
- the groupId or
null
-
setGroupId
-
getArtifactId
Description copied from interface:ProjectDescription
Return the buildartifactId
.- Specified by:
getArtifactId
in interfaceProjectDescription
- Returns:
- the artifactId or
null
-
setArtifactId
-
getVersion
Description copied from interface:ProjectDescription
Return the version of the project.- Specified by:
getVersion
in interfaceProjectDescription
- Returns:
- the version of
null
-
setVersion
-
getName
Description copied from interface:ProjectDescription
Return a simple name for the project.- Specified by:
getName
in interfaceProjectDescription
- Returns:
- the name of the project or
null
-
setName
-
getDescription
Description copied from interface:ProjectDescription
Return a human-readable description of the project.- Specified by:
getDescription
in interfaceProjectDescription
- Returns:
- the description of the project or
null
-
setDescription
-
getApplicationName
Description copied from interface:ProjectDescription
Return the name of the application as a standard Java identifier.- Specified by:
getApplicationName
in interfaceProjectDescription
- Returns:
- the name of the application or
null
-
setApplicationName
-
getPackageName
Description copied from interface:ProjectDescription
Return the root package name of the project.- Specified by:
getPackageName
in interfaceProjectDescription
- Returns:
- the package name or
null
-
setPackageName
-
getBaseDirectory
Description copied from interface:ProjectDescription
Return the base directory of the project ornull
to use the root directory.- Specified by:
getBaseDirectory
in interfaceProjectDescription
- Returns:
- the base directory
-
setBaseDirectory
-