@NotThreadSafe public static final class ImmutableArgumentMeta.Builder extends Object
ImmutableArgumentMeta.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableArgumentMeta |
build()
Builds a new
ImmutableArgumentMeta. |
ImmutableArgumentMeta.Builder |
from(ArgumentMeta instance)
Fill a builder with attribute values from the provided
ArgumentMeta instance. |
ImmutableArgumentMeta.Builder |
name(Optional<String> name)
Initializes the optional value
name to name. |
ImmutableArgumentMeta.Builder |
name(String name)
Initializes the optional value
name to name. |
ImmutableArgumentMeta.Builder |
type(String type)
Initializes the value for the
type attribute. |
@CanIgnoreReturnValue public final ImmutableArgumentMeta.Builder from(ArgumentMeta instance)
ArgumentMeta instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableArgumentMeta.Builder type(String type)
type attribute.type - The value for typethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableArgumentMeta.Builder name(String name)
name to name.name - The value for namethis builder for chained invocation@CanIgnoreReturnValue public final ImmutableArgumentMeta.Builder name(Optional<String> name)
name to name.name - The value for namethis builder for use in a chained invocationpublic ImmutableArgumentMeta build()
ImmutableArgumentMeta.IllegalStateException - if any required attributes are missingCopyright © 2019–2021 Nuiton. All rights reserved.