Class GradleSnippetContainer
java.lang.Object
io.spring.initializr.generator.buildsystem.gradle.GradleSnippetContainer
A container for Gradle snippets.
- Author:
- Stephane Nicoll
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Consumer<IndentingWriter> writer) Register asnippet
with no import.void
add
(Set<String> importedTypes, Consumer<IndentingWriter> writer) Register asnippet
with the specified types to import and writer.Return the fully qualified name of types to import.boolean
isEmpty()
Specify if this container is empty.values()
Return theGradle snippets
to apply.
-
Constructor Details
-
GradleSnippetContainer
public GradleSnippetContainer()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
true
if no snippet is registered
-
values
Return theGradle snippets
to apply.- Returns:
- the gradle snippets
-
importedTypes
Return the fully qualified name of types to import.- Returns:
- the imported types
-
add
Register asnippet
with the specified types to import and writer.- Parameters:
importedTypes
- the types to importwriter
- the writer to use.
-
add
Register asnippet
with no import.- Parameters:
writer
- the writer to use.
-