@NotThreadSafe public static final class JsBundleDescriptionArg.Builder extends Object
JsBundleDescriptionArg
.
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 |
---|---|
JsBundleDescriptionArg.Builder |
addAllBundleNameForFlavor(Iterable<? extends Pair<Flavor,String>> elements)
Adds elements to
bundleNameForFlavor list. |
JsBundleDescriptionArg.Builder |
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
compatibleWith list. |
JsBundleDescriptionArg.Builder |
addAllDeps(Iterable<? extends BuildTarget> elements)
Adds elements to
deps sortedSet. |
JsBundleDescriptionArg.Builder |
addAllLabels(Iterable<String> elements)
Adds elements to
labels sortedSet. |
JsBundleDescriptionArg.Builder |
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements to
licenses set. |
JsBundleDescriptionArg.Builder |
addBundleNameForFlavor(Pair<Flavor,String>... elements)
Adds elements to
bundleNameForFlavor list. |
JsBundleDescriptionArg.Builder |
addBundleNameForFlavor(Pair<Flavor,String> element)
Adds one element to
bundleNameForFlavor list. |
JsBundleDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements to
compatibleWith list. |
JsBundleDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element to
compatibleWith list. |
JsBundleDescriptionArg.Builder |
addDeps(BuildTarget... elements)
Adds elements to
deps sortedSet. |
JsBundleDescriptionArg.Builder |
addDeps(BuildTarget element)
Adds one element to
deps sortedSet. |
JsBundleDescriptionArg.Builder |
addLabels(String... elements)
Adds elements to
labels sortedSet. |
JsBundleDescriptionArg.Builder |
addLabels(String element)
Adds one element to
labels sortedSet. |
JsBundleDescriptionArg.Builder |
addLicenses(SourcePath... elements)
Adds elements to
licenses set. |
JsBundleDescriptionArg.Builder |
addLicenses(SourcePath element)
Adds one element to
licenses set. |
JsBundleDescriptionArg |
build()
Builds a new
JsBundleDescriptionArg . |
JsBundleDescriptionArg.Builder |
from(BuildRuleArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.BuildRuleArg instance. |
JsBundleDescriptionArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
JsBundleDescriptionArg.Builder |
from(HasBundleName instance)
Fill a builder with attribute values from the provided
com.facebook.buck.features.js.HasBundleName instance. |
JsBundleDescriptionArg.Builder |
from(HasDeclaredDeps instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasDeclaredDeps instance. |
JsBundleDescriptionArg.Builder |
from(HasExtraJson instance)
Fill a builder with attribute values from the provided
com.facebook.buck.features.js.HasExtraJson instance. |
JsBundleDescriptionArg.Builder |
from(com.facebook.buck.features.js.JsBundleDescription.AbstractJsBundleDescriptionArg instance)
Copy abstract value type
AbstractJsBundleDescriptionArg instance into builder. |
JsBundleDescriptionArg.Builder |
from(JsBundleDescriptionArg instance)
Fill a builder with attribute values from the provided
JsBundleDescriptionArg instance. |
JsBundleDescriptionArg.Builder |
setAndroidPackage(Optional<String> androidPackage)
Initializes the optional value
androidPackage to androidPackage. |
JsBundleDescriptionArg.Builder |
setAndroidPackage(String androidPackage)
Initializes the optional value
androidPackage to androidPackage. |
JsBundleDescriptionArg.Builder |
setBundleName(Optional<String> bundleName)
Initializes the optional value
bundleName to bundleName. |
JsBundleDescriptionArg.Builder |
setBundleName(String bundleName)
Initializes the optional value
bundleName to bundleName. |
JsBundleDescriptionArg.Builder |
setBundleNameForFlavor(Iterable<? extends Pair<Flavor,String>> elements)
Sets or replaces all elements for
bundleNameForFlavor list. |
JsBundleDescriptionArg.Builder |
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
compatibleWith list. |
JsBundleDescriptionArg.Builder |
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
JsBundleDescriptionArg.Builder |
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
JsBundleDescriptionArg.Builder |
setDeps(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements for
deps sortedSet. |
JsBundleDescriptionArg.Builder |
setEntry(Either<com.google.common.collect.ImmutableSet<String>,String> entry)
Initializes the value for the
entry attribute. |
JsBundleDescriptionArg.Builder |
setExtraJson(Optional<? extends StringWithMacros> extraJson)
Initializes the optional value
extraJson to extraJson. |
JsBundleDescriptionArg.Builder |
setExtraJson(StringWithMacros extraJson)
Initializes the optional value
extraJson to extraJson. |
JsBundleDescriptionArg.Builder |
setLabels(Iterable<String> elements)
Sets or replaces all elements for
labels sortedSet. |
JsBundleDescriptionArg.Builder |
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
licenses set. |
JsBundleDescriptionArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
JsBundleDescriptionArg.Builder |
setWorker(BuildTarget worker)
Initializes the value for the
worker attribute. |
public final JsBundleDescriptionArg.Builder from(HasDeclaredDeps instance)
com.facebook.buck.core.description.arg.HasDeclaredDeps
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder from(JsBundleDescriptionArg instance)
JsBundleDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder from(com.facebook.buck.features.js.JsBundleDescription.AbstractJsBundleDescriptionArg instance)
AbstractJsBundleDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder from(HasExtraJson instance)
com.facebook.buck.features.js.HasExtraJson
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder from(HasBundleName instance)
com.facebook.buck.features.js.HasBundleName
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.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 JsBundleDescriptionArg.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 JsBundleDescriptionArg.Builder setEntry(Either<com.google.common.collect.ImmutableSet<String>,String> entry)
entry
attribute.entry
- The value for entrythis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setWorker(BuildTarget worker)
worker
attribute.worker
- The value for workerthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setAndroidPackage(String androidPackage)
androidPackage
to androidPackage.androidPackage
- The value for androidPackagethis
builder for chained invocationpublic final JsBundleDescriptionArg.Builder setAndroidPackage(Optional<String> androidPackage)
androidPackage
to androidPackage.androidPackage
- The value for androidPackagethis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final JsBundleDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setExtraJson(StringWithMacros extraJson)
extraJson
to extraJson.extraJson
- The value for extraJsonthis
builder for chained invocationpublic final JsBundleDescriptionArg.Builder setExtraJson(Optional<? extends StringWithMacros> extraJson)
extraJson
to extraJson.extraJson
- The value for extraJsonthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setBundleName(String bundleName)
bundleName
to bundleName.bundleName
- The value for bundleNamethis
builder for chained invocationpublic final JsBundleDescriptionArg.Builder setBundleName(Optional<String> bundleName)
bundleName
to bundleName.bundleName
- The value for bundleNamethis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addBundleNameForFlavor(Pair<Flavor,String> element)
bundleNameForFlavor
list.element
- A bundleNameForFlavor elementthis
builder for use in a chained invocation@SafeVarargs public final JsBundleDescriptionArg.Builder addBundleNameForFlavor(Pair<Flavor,String>... elements)
bundleNameForFlavor
list.elements
- An array of bundleNameForFlavor elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder setBundleNameForFlavor(Iterable<? extends Pair<Flavor,String>> elements)
bundleNameForFlavor
list.elements
- An iterable of bundleNameForFlavor elementsthis
builder for use in a chained invocationpublic final JsBundleDescriptionArg.Builder addAllBundleNameForFlavor(Iterable<? extends Pair<Flavor,String>> elements)
bundleNameForFlavor
list.elements
- An iterable of bundleNameForFlavor elementsthis
builder for use in a chained invocationpublic JsBundleDescriptionArg build()
JsBundleDescriptionArg
.IllegalStateException
- if any required attributes are missing