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 TypeMethodDescriptionvoidadd(Consumer<IndentingWriter> writer) Register asnippetwith no import.voidadd(Set<String> importedTypes, Consumer<IndentingWriter> writer) Register asnippetwith the specified types to import and writer.Return the fully qualified name of types to import.booleanisEmpty()Specify if this container is empty.values()Return theGradle snippetsto apply.
-
Constructor Details
-
GradleSnippetContainer
public GradleSnippetContainer()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
trueif no snippet is registered
-
values
Return theGradle snippetsto apply.- Returns:
- the gradle snippets
-
importedTypes
Return the fully qualified name of types to import.- Returns:
- the imported types
-
add
Register asnippetwith the specified types to import and writer.- Parameters:
importedTypes- the types to importwriter- the writer to use.
-
add
Register asnippetwith no import.- Parameters:
writer- the writer to use.
-