public static class ImmutableCamelLoader.Builder extends Object
ImmutableCamelLoader.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Constructor and Description |
|---|
Builder()
Creates a builder for
ImmutableCamelLoader instances. |
| Modifier and Type | Method and Description |
|---|---|
CamelLoader.Builder |
addAllDependencies(Iterable<? extends Artifact> elements)
Adds elements to
dependencies set. |
CamelLoader.Builder |
addAllLanguages(Iterable<String> elements)
Adds elements to
languages set. |
CamelLoader.Builder |
addDependencies(Artifact... elements)
Adds elements to
dependencies set. |
CamelLoader.Builder |
addDependency(Artifact element)
Adds one element to
dependencies set. |
CamelLoader.Builder |
addLanguage(String element)
Adds one element to
languages set. |
CamelLoader.Builder |
addLanguages(String... elements)
Adds elements to
languages set. |
CamelLoader.Builder |
artifactId(String artifactId)
Initializes the value for the
artifactId attribute. |
ImmutableCamelLoader |
build()
Builds a new
ImmutableCamelLoader. |
CamelLoader.Builder |
dependencies(Iterable<? extends Artifact> elements)
Sets or replaces all elements for
dependencies set. |
CamelLoader.Builder |
from(Artifact instance)
Fill a builder with attribute values from the provided
org.apache.camel.k.tooling.maven.model.Artifact instance. |
CamelLoader.Builder |
from(CamelLoader instance)
Fill a builder with attribute values from the provided
org.apache.camel.k.tooling.maven.model.CamelLoader instance. |
CamelLoader.Builder |
groupId(String groupId)
Initializes the value for the
groupId attribute. |
CamelLoader.Builder |
languages(Iterable<String> elements)
Sets or replaces all elements for
languages set. |
CamelLoader.Builder |
metadata(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
metadata map. |
CamelLoader.Builder |
putAllMetadata(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
metadata map. |
CamelLoader.Builder |
putMetadata(Map.Entry<String,? extends String> entry)
Put one entry to the
metadata map. |
CamelLoader.Builder |
putMetadata(String key,
String value)
Put one entry to the
metadata map. |
CamelLoader.Builder |
version(Optional<String> version)
Initializes the optional value
version to version. |
CamelLoader.Builder |
version(String version)
Initializes the optional value
version to version. |
public Builder()
ImmutableCamelLoader instances.
new CamelLoader.Builder()
.groupId(String) // required groupId
.artifactId(String) // required artifactId
.version(String) // optional version
.addLanguage|addAllLanguages(String) // languages elements
.addDependency|addAllDependencies(org.apache.camel.k.tooling.maven.model.Artifact) // dependencies elements
.putMetadata|putAllMetadata(String => String) // metadata mappings
.build();
@CanIgnoreReturnValue public final CamelLoader.Builder from(CamelLoader instance)
org.apache.camel.k.tooling.maven.model.CamelLoader instance.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder from(Artifact instance)
org.apache.camel.k.tooling.maven.model.Artifact instance.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder groupId(String groupId)
groupId attribute.groupId - The value for groupIdthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder artifactId(String artifactId)
artifactId attribute.artifactId - The value for artifactIdthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder version(String version)
version to version.version - The value for versionthis builder for chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder version(Optional<String> version)
version to version.version - The value for versionthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder addLanguage(String element)
languages set.element - A languages elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder addLanguages(String... elements)
languages set.elements - An array of languages elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder languages(Iterable<String> elements)
languages set.elements - An iterable of languages elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder addAllLanguages(Iterable<String> elements)
languages set.elements - An iterable of languages elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder addDependency(Artifact element)
dependencies set.element - A dependencies elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder addDependencies(Artifact... elements)
dependencies set.elements - An array of dependencies elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder dependencies(Iterable<? extends Artifact> elements)
dependencies set.elements - An iterable of dependencies elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder addAllDependencies(Iterable<? extends Artifact> elements)
dependencies set.elements - An iterable of dependencies elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder putMetadata(String key, String value)
metadata map.key - The key in the metadata mapvalue - The associated value in the metadata mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder putMetadata(Map.Entry<String,? extends String> entry)
metadata map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder metadata(Map<String,? extends String> entries)
metadata map. Nulls are not permittedentries - The entries that will be added to the metadata mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelLoader.Builder putAllMetadata(Map<String,? extends String> entries)
metadata map. Nulls are not permittedentries - The entries that will be added to the metadata mapthis builder for use in a chained invocationpublic ImmutableCamelLoader build()
ImmutableCamelLoader.IllegalStateException - if any required attributes are missingCopyright © 2020 The Apache Software Foundation. All rights reserved.