public static final class ImmutablePackage.Builder extends Object
ImmutablePackage.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutablePackage.Builder |
archiveType(ArchiveType archiveType)
Initializes the value for the
archiveType attribute. |
ImmutablePackage |
build()
Builds a new
ImmutablePackage. |
ImmutablePackage.Builder |
fileSet(FileSet fileSet)
Initializes the value for the
fileSet attribute. |
ImmutablePackage.Builder |
from(Package instance)
Fill a builder with attribute values from the provided
Package instance. |
ImmutablePackage.Builder |
hint(Optional<String> hint)
Initializes the optional value
hint to hint. |
ImmutablePackage.Builder |
hint(String hint)
Initializes the optional value
hint to hint. |
ImmutablePackage.Builder |
url(String url)
Initializes the value for the
url attribute. |
public final ImmutablePackage.Builder from(Package instance)
Package instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutablePackage.Builder archiveType(ArchiveType archiveType)
archiveType attribute.archiveType - The value for archiveTypethis builder for use in a chained invocationpublic final ImmutablePackage.Builder fileSet(FileSet fileSet)
fileSet attribute.fileSet - The value for fileSetthis builder for use in a chained invocationpublic final ImmutablePackage.Builder url(String url)
url attribute.url - The value for urlthis builder for use in a chained invocationpublic final ImmutablePackage.Builder hint(String hint)
hint to hint.hint - The value for hintthis builder for chained invocationpublic final ImmutablePackage.Builder hint(Optional<String> hint)
hint to hint.hint - The value for hintthis builder for use in a chained invocationpublic ImmutablePackage build()
ImmutablePackage.IllegalStateException - if any required attributes are missingCopyright © 2025. All rights reserved.