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