Class ImmutableResolvedProtocPlugin.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.plugins.ImmutableResolvedProtocPlugin.Builder
- Enclosing class:
ImmutableResolvedProtocPlugin
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableResolvedProtocPlugin
.private String
from
(ResolvedProtocPlugin instance) Fill a builder with attribute values from the providedResolvedProtocPlugin
instance.Initializes the value for theid
attribute.Initializes the optional valueoptions
to options.Initializes the optional valueoptions
to options.order
(int order) Initializes the value for theorder
attribute.Initializes the value for thepath
attribute.
-
Field Details
-
INIT_BIT_PATH
private static final long INIT_BIT_PATH- See Also:
-
INIT_BIT_ID
private static final long INIT_BIT_ID- See Also:
-
INIT_BIT_ORDER
private static final long INIT_BIT_ORDER- See Also:
-
initBits
private long initBits -
path
-
id
-
options
-
order
private int order
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedResolvedProtocPlugin
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
-
path
Initializes the value for thepath
attribute.- Parameters:
path
- The value for path (can benull
)- Returns:
this
builder for use in a chained invocation
-
id
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
options
Initializes the optional valueoptions
to options.- Parameters:
options
- The value for options,null
is accepted asjava.util.Optional.empty()
- Returns:
this
builder for chained invocation
-
options
Initializes the optional valueoptions
to options.- Parameters:
options
- The value for options- Returns:
this
builder for use in a chained invocation
-
order
Initializes the value for theorder
attribute.- Parameters:
order
- The value for order- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableResolvedProtocPlugin
.- Returns:
- An immutable instance of ResolvedProtocPlugin
- Throws:
IllegalStateException
- if any required attributes are missing
-
formatRequiredAttributesMessage
-