Class ImmutableLanguageProtocTarget.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.protoc.targets.ImmutableLanguageProtocTarget.Builder
- Enclosing class:
ImmutableLanguageProtocTarget
Builds instances of type
ImmutableLanguageProtocTarget
.
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 newImmutableLanguageProtocTarget
.private String
private void
from
(LanguageProtocTarget instance) Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.protoc.targets.LanguageProtocTarget
instance.from
(ProtocTarget instance) Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.protoc.targets.ProtocTarget
instance.isLite
(boolean isLite) Initializes the value for theisLite
attribute.Initializes the value for thelanguage
attribute.order
(int order) Initializes the value for theorder
attribute.private boolean
outputPath
(Path outputPath) Initializes the value for theoutputPath
attribute.
-
Field Details
-
INIT_BIT_LANGUAGE
private static final long INIT_BIT_LANGUAGE- See Also:
-
INIT_BIT_OUTPUT_PATH
private static final long INIT_BIT_OUTPUT_PATH- See Also:
-
INIT_BIT_IS_LITE
private static final long INIT_BIT_IS_LITE- See Also:
-
OPT_BIT_ORDER
private static final long OPT_BIT_ORDER- See Also:
-
initBits
private long initBits -
optBits
private long optBits -
order
private int order -
language
-
outputPath
-
isLite
private boolean isLite
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.protoc.targets.ProtocTarget
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.protoc.targets.LanguageProtocTarget
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
-
order
-
language
Initializes the value for thelanguage
attribute.- Parameters:
language
- The value for language (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
-
isLite
Initializes the value for theisLite
attribute.- Parameters:
isLite
- The value for isLite- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableLanguageProtocTarget
.- Returns:
- An immutable instance of LanguageProtocTarget
- Throws:
IllegalStateException
- if any required attributes are missing
-
orderIsSet
private boolean orderIsSet() -
formatRequiredAttributesMessage
-