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