Class ImmutableDescriptorListing.Builder
java.lang.Object
io.github.ascopes.protobufmavenplugin.sources.ImmutableDescriptorListing.Builder
- Enclosing class:
ImmutableDescriptorListing
@Generated(from="DescriptorListing",
generator="Immutables")
public static final class ImmutableDescriptorListing.Builder
extends Object
Builds instances of type
ImmutableDescriptorListing.
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 TypeMethodDescriptionaddAllSourceFiles(Iterable<@Nullable String> elements) Adds elements tosourceFilesset.addSourceFiles(@Nullable String element) Adds one element tosourceFilesset.addSourceFiles(@Nullable String... elements) Adds elements tosourceFilesset.build()Builds a newImmutableDescriptorListing.descriptorFilePath(Path descriptorFilePath) Initializes the value for thedescriptorFilePathattribute.from(DescriptorListing instance) Fill a builder with attribute values from the providedDescriptorListinginstance.sourceFiles(Iterable<@Nullable String> elements) Sets or replaces all elements forsourceFilesset.
-
Method Details
-
from
Fill a builder with attribute values from the providedDescriptorListinginstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
descriptorFilePath
Initializes the value for thedescriptorFilePathattribute.- Parameters:
descriptorFilePath- The value for descriptorFilePath (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addSourceFiles
Adds one element tosourceFilesset.- Parameters:
element- A sourceFiles element- Returns:
thisbuilder for use in a chained invocation
-
addSourceFiles
Adds elements tosourceFilesset.- Parameters:
elements- An array of sourceFiles elements- Returns:
thisbuilder for use in a chained invocation
-
sourceFiles
Sets or replaces all elements forsourceFilesset.- Parameters:
elements- An iterable of sourceFiles elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSourceFiles
public final ImmutableDescriptorListing.Builder addAllSourceFiles(Iterable<@Nullable String> elements) Adds elements tosourceFilesset.- Parameters:
elements- An iterable of sourceFiles elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableDescriptorListing.- Returns:
- An immutable instance of DescriptorListing
- Throws:
IllegalStateException- if any required attributes are missing
-