Class ImmutableDescriptorFileProtocTarget.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.protoc.targets.ImmutableDescriptorFileProtocTarget.Builder
- Enclosing class:
ImmutableDescriptorFileProtocTarget
@Generated(from="DescriptorFileProtocTarget",
generator="Immutables")
public static final class ImmutableDescriptorFileProtocTarget.Builder
extends Object
Builds instances of type
ImmutableDescriptorFileProtocTarget.
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 newImmutableDescriptorFileProtocTarget.from(DescriptorFileProtocTarget instance) Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.protoc.targets.DescriptorFileProtocTargetinstance.from(ProtocTarget instance) Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.protoc.targets.ProtocTargetinstance.includeImports(boolean includeImports) Initializes the value for theincludeImportsattribute.includeSourceInfo(boolean includeSourceInfo) Initializes the value for theincludeSourceInfoattribute.order(int order) Initializes the value for theorderattribute.outputFile(Path outputFile) Initializes the value for theoutputFileattribute.retainOptions(boolean retainOptions) Initializes the value for theretainOptionsattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.protoc.targets.ProtocTargetinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.github.ascopes.protobufmavenplugin.protoc.targets.DescriptorFileProtocTargetinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
order
-
outputFile
Initializes the value for theoutputFileattribute.- Parameters:
outputFile- The value for outputFile (can benull)- Returns:
thisbuilder for use in a chained invocation
-
includeImports
Initializes the value for theincludeImportsattribute.- Parameters:
includeImports- The value for includeImports- Returns:
thisbuilder for use in a chained invocation
-
includeSourceInfo
public final ImmutableDescriptorFileProtocTarget.Builder includeSourceInfo(boolean includeSourceInfo) Initializes the value for theincludeSourceInfoattribute.- Parameters:
includeSourceInfo- The value for includeSourceInfo- Returns:
thisbuilder for use in a chained invocation
-
retainOptions
Initializes the value for theretainOptionsattribute.- Parameters:
retainOptions- The value for retainOptions- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableDescriptorFileProtocTarget.- Returns:
- An immutable instance of DescriptorFileProtocTarget
- Throws:
IllegalStateException- if any required attributes are missing
-