@NotThreadSafe public static final class HttpArchiveDescriptionArg.Builder extends Object
HttpArchiveDescriptionArg
.
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 |
---|---|
HttpArchiveDescriptionArg.Builder |
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
compatibleWith list. |
HttpArchiveDescriptionArg.Builder |
addAllLabels(Iterable<String> elements)
Adds elements to
labels sortedSet. |
HttpArchiveDescriptionArg.Builder |
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements to
licenses set. |
HttpArchiveDescriptionArg.Builder |
addAllUrls(Iterable<? extends URI> elements)
Adds elements to
urls list. |
HttpArchiveDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements to
compatibleWith list. |
HttpArchiveDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element to
compatibleWith list. |
HttpArchiveDescriptionArg.Builder |
addLabels(String... elements)
Adds elements to
labels sortedSet. |
HttpArchiveDescriptionArg.Builder |
addLabels(String element)
Adds one element to
labels sortedSet. |
HttpArchiveDescriptionArg.Builder |
addLicenses(SourcePath... elements)
Adds elements to
licenses set. |
HttpArchiveDescriptionArg.Builder |
addLicenses(SourcePath element)
Adds one element to
licenses set. |
HttpArchiveDescriptionArg.Builder |
addUrls(URI... elements)
Adds elements to
urls list. |
HttpArchiveDescriptionArg.Builder |
addUrls(URI element)
Adds one element to
urls list. |
HttpArchiveDescriptionArg |
build()
Builds a new
HttpArchiveDescriptionArg . |
HttpArchiveDescriptionArg.Builder |
from(BuildRuleArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.BuildRuleArg instance. |
HttpArchiveDescriptionArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
HttpArchiveDescriptionArg.Builder |
from(com.facebook.buck.file.HttpArchiveDescription.AbstractHttpArchiveDescriptionArg instance)
Copy abstract value type
AbstractHttpArchiveDescriptionArg instance into builder. |
HttpArchiveDescriptionArg.Builder |
from(HttpArchiveDescriptionArg instance)
Fill a builder with attribute values from the provided
HttpArchiveDescriptionArg instance. |
HttpArchiveDescriptionArg.Builder |
from(com.facebook.buck.file.HttpCommonDescriptionArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.file.HttpCommonDescriptionArg instance. |
HttpArchiveDescriptionArg.Builder |
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
compatibleWith list. |
HttpArchiveDescriptionArg.Builder |
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
HttpArchiveDescriptionArg.Builder |
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
HttpArchiveDescriptionArg.Builder |
setLabels(Iterable<String> elements)
Sets or replaces all elements for
labels sortedSet. |
HttpArchiveDescriptionArg.Builder |
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
licenses set. |
HttpArchiveDescriptionArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
HttpArchiveDescriptionArg.Builder |
setOut(Optional<String> out)
Initializes the optional value
out to out. |
HttpArchiveDescriptionArg.Builder |
setOut(String out)
Initializes the optional value
out to out. |
HttpArchiveDescriptionArg.Builder |
setSha256(String sha256)
Initializes the value for the
sha256 attribute. |
HttpArchiveDescriptionArg.Builder |
setStripPrefix(Optional<String> stripPrefix)
Initializes the optional value
stripPrefix to stripPrefix. |
HttpArchiveDescriptionArg.Builder |
setStripPrefix(String stripPrefix)
Initializes the optional value
stripPrefix to stripPrefix. |
HttpArchiveDescriptionArg.Builder |
setType(Optional<String> type)
Initializes the optional value
type to type. |
HttpArchiveDescriptionArg.Builder |
setType(String type)
Initializes the optional value
type to type. |
HttpArchiveDescriptionArg.Builder |
setUrls(Iterable<? extends URI> elements)
Sets or replaces all elements for
urls list. |
public final HttpArchiveDescriptionArg.Builder from(com.facebook.buck.file.HttpCommonDescriptionArg instance)
com.facebook.buck.file.HttpCommonDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder from(BuildRuleArg instance)
com.facebook.buck.core.description.arg.BuildRuleArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder from(ConstructorArg instance)
com.facebook.buck.core.description.arg.ConstructorArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder from(HttpArchiveDescriptionArg instance)
HttpArchiveDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder from(com.facebook.buck.file.HttpArchiveDescription.AbstractHttpArchiveDescriptionArg instance)
AbstractHttpArchiveDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setStripPrefix(String stripPrefix)
stripPrefix
to stripPrefix.stripPrefix
- The value for stripPrefixthis
builder for chained invocationpublic final HttpArchiveDescriptionArg.Builder setStripPrefix(Optional<String> stripPrefix)
stripPrefix
to stripPrefix.stripPrefix
- The value for stripPrefixthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setType(String type)
type
to type.type
- The value for typethis
builder for chained invocationpublic final HttpArchiveDescriptionArg.Builder setType(Optional<String> type)
type
to type.type
- The value for typethis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setSha256(String sha256)
sha256
attribute.sha256
- The value for sha256this
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addUrls(URI element)
urls
list.element
- A urls elementthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addUrls(URI... elements)
urls
list.elements
- An array of urls elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setUrls(Iterable<? extends URI> elements)
urls
list.elements
- An iterable of urls elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addAllUrls(Iterable<? extends URI> elements)
urls
list.elements
- An iterable of urls elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setOut(String out)
out
to out.out
- The value for outthis
builder for chained invocationpublic final HttpArchiveDescriptionArg.Builder setOut(Optional<String> out)
out
to out.out
- The value for outthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final HttpArchiveDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final HttpArchiveDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic HttpArchiveDescriptionArg build()
HttpArchiveDescriptionArg
.IllegalStateException
- if any required attributes are missing