@NotThreadSafe public static final class JsBundleGenruleDescriptionArg.Builder extends Object
JsBundleGenruleDescriptionArg
.
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.
public final JsBundleGenruleDescriptionArg.Builder from(JsBundleGenruleDescriptionArg instance)
JsBundleGenruleDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder from(com.facebook.buck.features.js.JsBundleGenruleDescription.AbstractJsBundleGenruleDescriptionArg instance)
AbstractJsBundleGenruleDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder from(HasTests instance)
com.facebook.buck.core.description.arg.HasTests
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder from(AbstractGenruleDescription.CommonArg instance)
com.facebook.buck.shell.AbstractGenruleDescription.CommonArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.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 JsBundleGenruleDescriptionArg.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 JsBundleGenruleDescriptionArg.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 JsBundleGenruleDescriptionArg.Builder setJsBundle(BuildTarget jsBundle)
jsBundle
attribute.jsBundle
- The value for jsBundlethis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setRewriteSourcemap(boolean rewriteSourcemap)
rewriteSourcemap
attribute.
If not set, this attribute will have a default value as returned by the initializer of rewriteSourcemap
.
rewriteSourcemap
- The value for rewriteSourcemapthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setRewriteMisc(boolean rewriteMisc)
rewriteMisc
attribute.
If not set, this attribute will have a default value as returned by the initializer of rewriteMisc
.
rewriteMisc
- The value for rewriteMiscthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setSkipResources(boolean skipResources)
skipResources
attribute.
If not set, this attribute will have a default value as returned by the initializer of skipResources
.
skipResources
- The value for skipResourcesthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setRewriteDepsFile(boolean rewriteDepsFile)
rewriteDepsFile
attribute.
If not set, this attribute will have a default value as returned by the initializer of rewriteDepsFile
.
rewriteDepsFile
- The value for rewriteDepsFilethis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setBash(StringWithMacros bash)
bash
to bash.bash
- The value for bashthis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setBash(Optional<? extends StringWithMacros> bash)
bash
to bash.bash
- The value for bashthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setCacheable(boolean cacheable)
cacheable
to cacheable.cacheable
- The value for cacheablethis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setCacheable(Optional<Boolean> cacheable)
cacheable
to cacheable.cacheable
- The value for cacheablethis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setCmd(StringWithMacros cmd)
cmd
to cmd.cmd
- The value for cmdthis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setCmd(Optional<? extends StringWithMacros> cmd)
cmd
to cmd.cmd
- The value for cmdthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setCmdExe(StringWithMacros cmdExe)
cmdExe
to cmdExe.cmdExe
- The value for cmdExethis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setCmdExe(Optional<? extends StringWithMacros> cmdExe)
cmdExe
to cmdExe.cmdExe
- The value for cmdExethis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setEnableSandbox(boolean enableSandbox)
enableSandbox
to enableSandbox.enableSandbox
- The value for enableSandboxthis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setEnableSandbox(Optional<Boolean> enableSandbox)
enableSandbox
to enableSandbox.enableSandbox
- The value for enableSandboxthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setEnvironmentExpansionSeparator(String environmentExpansionSeparator)
environmentExpansionSeparator
to environmentExpansionSeparator.environmentExpansionSeparator
- The value for environmentExpansionSeparatorthis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setEnvironmentExpansionSeparator(Optional<String> environmentExpansionSeparator)
environmentExpansionSeparator
to environmentExpansionSeparator.environmentExpansionSeparator
- The value for environmentExpansionSeparatorthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setRemote(boolean remote)
remote
to remote.remote
- The value for remotethis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setRemote(Optional<Boolean> remote)
remote
to remote.remote
- The value for remotethis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setSrcs(SourceSet srcs)
srcs
attribute.
If not set, this attribute will have a default value as returned by the initializer of srcs
.
srcs
- The value for srcsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setNeedAndroidTools(boolean needAndroidTools)
needAndroidTools
attribute.
If not set, this attribute will have a default value as returned by the initializer of needAndroidTools
.
needAndroidTools
- The value for needAndroidToolsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addTests(BuildTarget element)
tests
sortedSet.element
- A tests elementthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addTests(BuildTarget... elements)
tests
sortedSet.elements
- An array of tests elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addAllTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setBundleName(String bundleName)
bundleName
to bundleName.bundleName
- The value for bundleNamethis
builder for chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setBundleName(Optional<String> bundleName)
bundleName
to bundleName.bundleName
- The value for bundleNamethis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addBundleNameForFlavor(Pair<Flavor,String> element)
bundleNameForFlavor
list.element
- A bundleNameForFlavor elementthis
builder for use in a chained invocation@SafeVarargs public final JsBundleGenruleDescriptionArg.Builder addBundleNameForFlavor(Pair<Flavor,String>... elements)
bundleNameForFlavor
list.elements
- An array of bundleNameForFlavor elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder setBundleNameForFlavor(Iterable<? extends Pair<Flavor,String>> elements)
bundleNameForFlavor
list.elements
- An iterable of bundleNameForFlavor elementsthis
builder for use in a chained invocationpublic final JsBundleGenruleDescriptionArg.Builder addAllBundleNameForFlavor(Iterable<? extends Pair<Flavor,String>> elements)
bundleNameForFlavor
list.elements
- An iterable of bundleNameForFlavor elementsthis
builder for use in a chained invocationpublic JsBundleGenruleDescriptionArg build()
JsBundleGenruleDescriptionArg
.IllegalStateException
- if any required attributes are missing