Class ImmutableResolvedProtocPlugin.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.plugins.ImmutableResolvedProtocPlugin.Builder
- Enclosing class:
ImmutableResolvedProtocPlugin
@Generated(from="ResolvedProtocPlugin",
generator="Immutables")
public static final class ImmutableResolvedProtocPlugin.Builder
extends Object
Builds instances of type
ImmutableResolvedProtocPlugin.
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 TypeMethodDescriptionbuild()Builds a newImmutableResolvedProtocPlugin.from(ResolvedProtocPlugin instance) Fill a builder with attribute values from the providedResolvedProtocPlugininstance.Initializes the value for theidattribute.Initializes the optional valueoptionsto options.Initializes the optional valueoptionsto options.order(int order) Initializes the value for theorderattribute.outputDirectory(Path outputDirectory) Initializes the value for theoutputDirectoryattribute.Initializes the value for thepathattribute.registerAsCompilationRoot(@Nullable Boolean registerAsCompilationRoot) Initializes the optional valueregisterAsCompilationRootto registerAsCompilationRoot.registerAsCompilationRoot(Optional<Boolean> registerAsCompilationRoot) Initializes the optional valueregisterAsCompilationRootto registerAsCompilationRoot.
-
Method Details
-
from
Fill a builder with attribute values from the providedResolvedProtocPlugininstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
options
Initializes the optional valueoptionsto options.- Parameters:
options- The value for options,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
options
Initializes the optional valueoptionsto options.- Parameters:
options- The value for options- Returns:
thisbuilder for use in a chained invocation
-
order
Initializes the value for theorderattribute.- Parameters:
order- The value for order- Returns:
thisbuilder for use in a chained invocation
-
outputDirectory
Initializes the value for theoutputDirectoryattribute.- Parameters:
outputDirectory- The value for outputDirectory (can benull)- Returns:
thisbuilder for use in a chained invocation
-
registerAsCompilationRoot
public final ImmutableResolvedProtocPlugin.Builder registerAsCompilationRoot(@Nullable Boolean registerAsCompilationRoot) Initializes the optional valueregisterAsCompilationRootto registerAsCompilationRoot.- Parameters:
registerAsCompilationRoot- The value for registerAsCompilationRoot,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
registerAsCompilationRoot
public final ImmutableResolvedProtocPlugin.Builder registerAsCompilationRoot(Optional<Boolean> registerAsCompilationRoot) Initializes the optional valueregisterAsCompilationRootto registerAsCompilationRoot.- Parameters:
registerAsCompilationRoot- The value for registerAsCompilationRoot- Returns:
thisbuilder for use in a chained invocation
-
path
Initializes the value for thepathattribute.- Parameters:
path- The value for path (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableResolvedProtocPlugin.- Returns:
- An immutable instance of ResolvedProtocPlugin
- Throws:
IllegalStateException- if any required attributes are missing
-