@NotThreadSafe public static final class GenruleDescriptionArg.Builder extends Object
GenruleDescriptionArg
.
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 |
---|---|
GenruleDescriptionArg.Builder |
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
compatibleWith list. |
GenruleDescriptionArg.Builder |
addAllLabels(Iterable<String> elements)
Adds elements to
labels sortedSet. |
GenruleDescriptionArg.Builder |
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements to
licenses set. |
GenruleDescriptionArg.Builder |
addAllTests(Iterable<? extends BuildTarget> elements)
Adds elements to
tests sortedSet. |
GenruleDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements to
compatibleWith list. |
GenruleDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element to
compatibleWith list. |
GenruleDescriptionArg.Builder |
addLabels(String... elements)
Adds elements to
labels sortedSet. |
GenruleDescriptionArg.Builder |
addLabels(String element)
Adds one element to
labels sortedSet. |
GenruleDescriptionArg.Builder |
addLicenses(SourcePath... elements)
Adds elements to
licenses set. |
GenruleDescriptionArg.Builder |
addLicenses(SourcePath element)
Adds one element to
licenses set. |
GenruleDescriptionArg.Builder |
addTests(BuildTarget... elements)
Adds elements to
tests sortedSet. |
GenruleDescriptionArg.Builder |
addTests(BuildTarget element)
Adds one element to
tests sortedSet. |
GenruleDescriptionArg |
build()
Builds a new
GenruleDescriptionArg . |
GenruleDescriptionArg.Builder |
from(AbstractGenruleDescription.CommonArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.shell.AbstractGenruleDescription.CommonArg instance. |
GenruleDescriptionArg.Builder |
from(BuildRuleArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.BuildRuleArg instance. |
GenruleDescriptionArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
GenruleDescriptionArg.Builder |
from(com.facebook.buck.shell.GenruleDescription.AbstractGenruleDescriptionArg instance)
Copy abstract value type
AbstractGenruleDescriptionArg instance into builder. |
GenruleDescriptionArg.Builder |
from(GenruleDescriptionArg instance)
Fill a builder with attribute values from the provided
GenruleDescriptionArg instance. |
GenruleDescriptionArg.Builder |
from(HasTests instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasTests instance. |
GenruleDescriptionArg.Builder |
setBash(Optional<? extends StringWithMacros> bash)
Initializes the optional value
bash to bash. |
GenruleDescriptionArg.Builder |
setBash(StringWithMacros bash)
Initializes the optional value
bash to bash. |
GenruleDescriptionArg.Builder |
setCacheable(boolean cacheable)
Initializes the optional value
cacheable to cacheable. |
GenruleDescriptionArg.Builder |
setCacheable(Optional<Boolean> cacheable)
Initializes the optional value
cacheable to cacheable. |
GenruleDescriptionArg.Builder |
setCmd(Optional<? extends StringWithMacros> cmd)
Initializes the optional value
cmd to cmd. |
GenruleDescriptionArg.Builder |
setCmd(StringWithMacros cmd)
Initializes the optional value
cmd to cmd. |
GenruleDescriptionArg.Builder |
setCmdExe(Optional<? extends StringWithMacros> cmdExe)
Initializes the optional value
cmdExe to cmdExe. |
GenruleDescriptionArg.Builder |
setCmdExe(StringWithMacros cmdExe)
Initializes the optional value
cmdExe to cmdExe. |
GenruleDescriptionArg.Builder |
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
compatibleWith list. |
GenruleDescriptionArg.Builder |
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
GenruleDescriptionArg.Builder |
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
GenruleDescriptionArg.Builder |
setEnableSandbox(boolean enableSandbox)
Initializes the optional value
enableSandbox to enableSandbox. |
GenruleDescriptionArg.Builder |
setEnableSandbox(Optional<Boolean> enableSandbox)
Initializes the optional value
enableSandbox to enableSandbox. |
GenruleDescriptionArg.Builder |
setEnvironmentExpansionSeparator(Optional<String> environmentExpansionSeparator)
Initializes the optional value
environmentExpansionSeparator to environmentExpansionSeparator. |
GenruleDescriptionArg.Builder |
setEnvironmentExpansionSeparator(String environmentExpansionSeparator)
Initializes the optional value
environmentExpansionSeparator to environmentExpansionSeparator. |
GenruleDescriptionArg.Builder |
setExecutable(boolean executable)
Initializes the optional value
executable to executable. |
GenruleDescriptionArg.Builder |
setExecutable(Optional<Boolean> executable)
Initializes the optional value
executable to executable. |
GenruleDescriptionArg.Builder |
setLabels(Iterable<String> elements)
Sets or replaces all elements for
labels sortedSet. |
GenruleDescriptionArg.Builder |
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
licenses set. |
GenruleDescriptionArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
GenruleDescriptionArg.Builder |
setNeedAndroidTools(boolean needAndroidTools)
Initializes the value for the
needAndroidTools attribute. |
GenruleDescriptionArg.Builder |
setOut(Optional<String> out)
Initializes the optional value
out to out. |
GenruleDescriptionArg.Builder |
setOut(String out)
Initializes the optional value
out to out. |
GenruleDescriptionArg.Builder |
setOuts(com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableSet<String>> outs)
Initializes the optional value
outs to outs. |
GenruleDescriptionArg.Builder |
setOuts(Optional<? extends com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableSet<String>>> outs)
Initializes the optional value
outs to outs. |
GenruleDescriptionArg.Builder |
setRemote(boolean remote)
Initializes the optional value
remote to remote. |
GenruleDescriptionArg.Builder |
setRemote(Optional<Boolean> remote)
Initializes the optional value
remote to remote. |
GenruleDescriptionArg.Builder |
setSrcs(SourceSet srcs)
Initializes the value for the
srcs attribute. |
GenruleDescriptionArg.Builder |
setTests(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements for
tests sortedSet. |
GenruleDescriptionArg.Builder |
setType(Optional<String> type)
Initializes the optional value
type to type. |
GenruleDescriptionArg.Builder |
setType(String type)
Initializes the optional value
type to type. |
public final GenruleDescriptionArg.Builder from(GenruleDescriptionArg instance)
GenruleDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder from(com.facebook.buck.shell.GenruleDescription.AbstractGenruleDescriptionArg instance)
AbstractGenruleDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.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 GenruleDescriptionArg.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 GenruleDescriptionArg.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 GenruleDescriptionArg.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 GenruleDescriptionArg.Builder setOut(String out)
out
to out.out
- The value for outthis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setOut(Optional<String> out)
out
to out.out
- The value for outthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setOuts(com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableSet<String>> outs)
outs
to outs.outs
- The value for outsthis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setOuts(Optional<? extends com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableSet<String>>> outs)
outs
to outs.outs
- The value for outsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setExecutable(boolean executable)
executable
to executable.executable
- The value for executablethis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setExecutable(Optional<Boolean> executable)
executable
to executable.executable
- The value for executablethis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setBash(StringWithMacros bash)
bash
to bash.bash
- The value for bashthis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setBash(Optional<? extends StringWithMacros> bash)
bash
to bash.bash
- The value for bashthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setCmd(StringWithMacros cmd)
cmd
to cmd.cmd
- The value for cmdthis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setCmd(Optional<? extends StringWithMacros> cmd)
cmd
to cmd.cmd
- The value for cmdthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setCmdExe(StringWithMacros cmdExe)
cmdExe
to cmdExe.cmdExe
- The value for cmdExethis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setCmdExe(Optional<? extends StringWithMacros> cmdExe)
cmdExe
to cmdExe.cmdExe
- The value for cmdExethis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setType(String type)
type
to type.type
- The value for typethis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setType(Optional<String> type)
type
to type.type
- The value for typethis
builder for use in a chained invocationpublic final GenruleDescriptionArg.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 GenruleDescriptionArg.Builder setEnableSandbox(boolean enableSandbox)
enableSandbox
to enableSandbox.enableSandbox
- The value for enableSandboxthis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setEnableSandbox(Optional<Boolean> enableSandbox)
enableSandbox
to enableSandbox.enableSandbox
- The value for enableSandboxthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setEnvironmentExpansionSeparator(String environmentExpansionSeparator)
environmentExpansionSeparator
to environmentExpansionSeparator.environmentExpansionSeparator
- The value for environmentExpansionSeparatorthis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setEnvironmentExpansionSeparator(Optional<String> environmentExpansionSeparator)
environmentExpansionSeparator
to environmentExpansionSeparator.environmentExpansionSeparator
- The value for environmentExpansionSeparatorthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setRemote(boolean remote)
remote
to remote.remote
- The value for remotethis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setRemote(Optional<Boolean> remote)
remote
to remote.remote
- The value for remotethis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setCacheable(boolean cacheable)
cacheable
to cacheable.cacheable
- The value for cacheablethis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setCacheable(Optional<Boolean> cacheable)
cacheable
to cacheable.cacheable
- The value for cacheablethis
builder for use in a chained invocationpublic final GenruleDescriptionArg.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 GenruleDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final GenruleDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addTests(BuildTarget element)
tests
sortedSet.element
- A tests elementthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addTests(BuildTarget... elements)
tests
sortedSet.elements
- An array of tests elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder setTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic final GenruleDescriptionArg.Builder addAllTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic GenruleDescriptionArg build()
GenruleDescriptionArg
.IllegalStateException
- if any required attributes are missing