Class ImmutableFlagDescriptor.Builder
java.lang.Object
org.incendo.cloud.annotations.descriptor.ImmutableFlagDescriptor.Builder
- Enclosing class:
ImmutableFlagDescriptor
@Generated(from="FlagDescriptor",
generator="Immutables")
public static final class ImmutableFlagDescriptor.Builder
extends Object
Builds instances of type
ImmutableFlagDescriptor.
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.
-
Method Summary
Modifier and TypeMethodDescriptionaliases(@NonNull Collection<String> aliases) Initializes the value for thealiasesattribute.build()Builds a newImmutableFlagDescriptor.description(@Nullable Description description) Initializes the value for thedescriptionattribute.from(Descriptor instance) Fill a builder with attribute values from the providedorg.incendo.cloud.annotations.descriptor.Descriptorinstance.from(FlagDescriptor instance) Fill a builder with attribute values from the providedorg.incendo.cloud.annotations.descriptor.FlagDescriptorinstance.Initializes the value for thenameattribute.Initializes the value for theparameterattribute.parserName(@Nullable String parserName) Initializes the value for theparserNameattribute.permission(@Nullable Permission permission) Initializes the value for thepermissionattribute.repeatable(boolean repeatable) Initializes the value for therepeatableattribute.suggestions(@Nullable String suggestions) Initializes the value for thesuggestionsattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.incendo.cloud.annotations.descriptor.FlagDescriptorinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedorg.incendo.cloud.annotations.descriptor.Descriptorinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
parameter
@CanIgnoreReturnValue public final ImmutableFlagDescriptor.Builder parameter(@NonNull Parameter parameter) Initializes the value for theparameterattribute.- Parameters:
parameter- The value for parameter- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
aliases
@CanIgnoreReturnValue public final ImmutableFlagDescriptor.Builder aliases(@NonNull Collection<String> aliases) Initializes the value for thealiasesattribute.- Parameters:
aliases- The value for aliases- Returns:
thisbuilder for use in a chained invocation
-
parserName
@CanIgnoreReturnValue public final ImmutableFlagDescriptor.Builder parserName(@Nullable String parserName) Initializes the value for theparserNameattribute.- Parameters:
parserName- The value for parserName (can benull)- Returns:
thisbuilder for use in a chained invocation
-
suggestions
@CanIgnoreReturnValue public final ImmutableFlagDescriptor.Builder suggestions(@Nullable String suggestions) Initializes the value for thesuggestionsattribute.- Parameters:
suggestions- The value for suggestions (can benull)- Returns:
thisbuilder for use in a chained invocation
-
permission
@CanIgnoreReturnValue public final ImmutableFlagDescriptor.Builder permission(@Nullable Permission permission) Initializes the value for thepermissionattribute.- Parameters:
permission- The value for permission (can benull)- Returns:
thisbuilder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableFlagDescriptor.Builder description(@Nullable Description description) Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description (can benull)- Returns:
thisbuilder for use in a chained invocation
-
repeatable
Initializes the value for therepeatableattribute.- Parameters:
repeatable- The value for repeatable- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableFlagDescriptor.- Returns:
- An immutable instance of FlagDescriptor
- Throws:
IllegalStateException- if any required attributes are missing
-