Class ImmutablePluginProtocTarget.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.protoc.targets.ImmutablePluginProtocTarget.Builder
- Enclosing class:
ImmutablePluginProtocTarget
Builds instances of type
ImmutablePluginProtocTarget
.
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private static final long
private long
private Path
private ResolvedProtocPlugin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutablePluginProtocTarget
.private String
from
(PluginProtocTarget instance) Fill a builder with attribute values from the providedPluginProtocTarget
instance.outputPath
(Path outputPath) Initializes the value for theoutputPath
attribute.plugin
(ResolvedProtocPlugin plugin) Initializes the value for theplugin
attribute.
-
Field Details
-
INIT_BIT_PLUGIN
private static final long INIT_BIT_PLUGIN- See Also:
-
INIT_BIT_OUTPUT_PATH
private static final long INIT_BIT_OUTPUT_PATH- See Also:
-
initBits
private long initBits -
plugin
-
outputPath
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedPluginProtocTarget
instance. 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:
this
builder for use in a chained invocation
-
plugin
Initializes the value for theplugin
attribute.- Parameters:
plugin
- The value for plugin (can benull
)- Returns:
this
builder for use in a chained invocation
-
outputPath
Initializes the value for theoutputPath
attribute.- Parameters:
outputPath
- The value for outputPath (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutablePluginProtocTarget
.- Returns:
- An immutable instance of PluginProtocTarget
- Throws:
IllegalStateException
- if any required attributes are missing
-
formatRequiredAttributesMessage
-