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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableLanguageProtocTarget
.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.Initializes the value for thelanguage
attribute.lite
(boolean lite) Initializes the value for thelite
attribute.order
(int order) Initializes the value for theorder
attribute.outputPath
(Path outputPath) Initializes the value for theoutputPath
attribute.
-
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
-
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
-
lite
Initializes the value for thelite
attribute.- Parameters:
lite
- The value for lite- 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
-