Class ImmutableFilesToCompile.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.sources.ImmutableFilesToCompile.Builder
- Enclosing class:
ImmutableFilesToCompile
Builds instances of type
ImmutableFilesToCompile
.
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 Collection
<String> private static final long
private static final long
private long
private Collection
<Path> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableFilesToCompile
.descriptorFiles
(Collection<String> descriptorFiles) Initializes the value for thedescriptorFiles
attribute.private String
from
(FilesToCompile instance) Fill a builder with attribute values from the providedFilesToCompile
instance.protoSources
(Collection<Path> protoSources) Initializes the value for theprotoSources
attribute.
-
Field Details
-
INIT_BIT_PROTO_SOURCES
private static final long INIT_BIT_PROTO_SOURCES- See Also:
-
INIT_BIT_DESCRIPTOR_FILES
private static final long INIT_BIT_DESCRIPTOR_FILES- See Also:
-
initBits
private long initBits -
protoSources
-
descriptorFiles
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedFilesToCompile
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
-
protoSources
Initializes the value for theprotoSources
attribute.- Parameters:
protoSources
- The value for protoSources (can benull
)- Returns:
this
builder for use in a chained invocation
-
descriptorFiles
Initializes the value for thedescriptorFiles
attribute.- Parameters:
descriptorFiles
- The value for descriptorFiles (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableFilesToCompile
.- Returns:
- An immutable instance of FilesToCompile
- Throws:
IllegalStateException
- if any required attributes are missing
-
formatRequiredAttributesMessage
-