@NotThreadSafe public static final class WorkerToolDescriptionArg.Builder extends Object
WorkerToolDescriptionArg.
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 |
|---|---|
WorkerToolDescriptionArg.Builder |
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
compatibleWith list. |
WorkerToolDescriptionArg.Builder |
addAllLabels(Iterable<String> elements)
Adds elements to
labels sortedSet. |
WorkerToolDescriptionArg.Builder |
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements to
licenses set. |
WorkerToolDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements to
compatibleWith list. |
WorkerToolDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element to
compatibleWith list. |
WorkerToolDescriptionArg.Builder |
addLabels(String... elements)
Adds elements to
labels sortedSet. |
WorkerToolDescriptionArg.Builder |
addLabels(String element)
Adds one element to
labels sortedSet. |
WorkerToolDescriptionArg.Builder |
addLicenses(SourcePath... elements)
Adds elements to
licenses set. |
WorkerToolDescriptionArg.Builder |
addLicenses(SourcePath element)
Adds one element to
licenses set. |
WorkerToolDescriptionArg |
build()
Builds a new
WorkerToolDescriptionArg. |
WorkerToolDescriptionArg.Builder |
from(BuildRuleArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.BuildRuleArg instance. |
WorkerToolDescriptionArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
WorkerToolDescriptionArg.Builder |
from(com.facebook.buck.shell.WorkerToolDescription.AbstractWorkerToolDescriptionArg instance)
Copy abstract value type
AbstractWorkerToolDescriptionArg instance into builder. |
WorkerToolDescriptionArg.Builder |
from(WorkerToolDescriptionArg instance)
Fill a builder with attribute values from the provided
WorkerToolDescriptionArg instance. |
WorkerToolDescriptionArg.Builder |
putAllEnv(Map<String,? extends StringWithMacros> entries)
Put all mappings from the specified map as entries to
env map. |
WorkerToolDescriptionArg.Builder |
putEnv(Map.Entry<String,? extends StringWithMacros> entry)
Put one entry to the
env map. |
WorkerToolDescriptionArg.Builder |
putEnv(String key,
StringWithMacros value)
Put one entry to the
env map. |
WorkerToolDescriptionArg.Builder |
setArgs(Either<StringWithMacros,com.google.common.collect.ImmutableList<StringWithMacros>> args)
Initializes the value for the
args attribute. |
WorkerToolDescriptionArg.Builder |
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
compatibleWith list. |
WorkerToolDescriptionArg.Builder |
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
WorkerToolDescriptionArg.Builder |
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
WorkerToolDescriptionArg.Builder |
setEnv(Map<String,? extends StringWithMacros> entries)
Sets or replaces all mappings from the specified map as entries for the
env map. |
WorkerToolDescriptionArg.Builder |
setExe(BuildTarget exe)
Initializes the optional value
exe to exe. |
WorkerToolDescriptionArg.Builder |
setExe(Optional<? extends BuildTarget> exe)
Initializes the optional value
exe to exe. |
WorkerToolDescriptionArg.Builder |
setLabels(Iterable<String> elements)
Sets or replaces all elements for
labels sortedSet. |
WorkerToolDescriptionArg.Builder |
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
licenses set. |
WorkerToolDescriptionArg.Builder |
setMaxWorkers(int maxWorkers)
Initializes the optional value
maxWorkers to maxWorkers. |
WorkerToolDescriptionArg.Builder |
setMaxWorkers(Optional<Integer> maxWorkers)
Initializes the optional value
maxWorkers to maxWorkers. |
WorkerToolDescriptionArg.Builder |
setMaxWorkersPerThreadPercent(int maxWorkersPerThreadPercent)
Initializes the optional value
maxWorkersPerThreadPercent to maxWorkersPerThreadPercent. |
WorkerToolDescriptionArg.Builder |
setMaxWorkersPerThreadPercent(Optional<Integer> maxWorkersPerThreadPercent)
Initializes the optional value
maxWorkersPerThreadPercent to maxWorkersPerThreadPercent. |
WorkerToolDescriptionArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
WorkerToolDescriptionArg.Builder |
setPersistent(boolean persistent)
Initializes the optional value
persistent to persistent. |
WorkerToolDescriptionArg.Builder |
setPersistent(Optional<Boolean> persistent)
Initializes the optional value
persistent to persistent. |
WorkerToolDescriptionArg.Builder |
setSoloAsync(boolean soloAsync)
Initializes the optional value
soloAsync to soloAsync. |
WorkerToolDescriptionArg.Builder |
setSoloAsync(Optional<Boolean> soloAsync)
Initializes the optional value
soloAsync to soloAsync. |
public final WorkerToolDescriptionArg.Builder from(WorkerToolDescriptionArg instance)
WorkerToolDescriptionArg instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder from(com.facebook.buck.shell.WorkerToolDescription.AbstractWorkerToolDescriptionArg instance)
AbstractWorkerToolDescriptionArg instance into builder.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.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 WorkerToolDescriptionArg.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 WorkerToolDescriptionArg.Builder putEnv(String key, StringWithMacros value)
env map.key - The key in the env mapvalue - The associated value in the env mapthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder putEnv(Map.Entry<String,? extends StringWithMacros> entry)
env map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setEnv(Map<String,? extends StringWithMacros> entries)
env map. Nulls are not permittedentries - The entries that will be added to the env mapthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder putAllEnv(Map<String,? extends StringWithMacros> entries)
env map. Nulls are not permittedentries - The entries that will be added to the env mapthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setArgs(Either<StringWithMacros,com.google.common.collect.ImmutableList<StringWithMacros>> args)
args attribute.
If not set, this attribute will have a default value as returned by the initializer of args.
args - The value for argsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setExe(BuildTarget exe)
exe to exe.exe - The value for exethis builder for chained invocationpublic final WorkerToolDescriptionArg.Builder setExe(Optional<? extends BuildTarget> exe)
exe to exe.exe - The value for exethis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setMaxWorkers(int maxWorkers)
maxWorkers to maxWorkers.maxWorkers - The value for maxWorkersthis builder for chained invocationpublic final WorkerToolDescriptionArg.Builder setMaxWorkers(Optional<Integer> maxWorkers)
maxWorkers to maxWorkers.maxWorkers - The value for maxWorkersthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setMaxWorkersPerThreadPercent(int maxWorkersPerThreadPercent)
maxWorkersPerThreadPercent to maxWorkersPerThreadPercent.maxWorkersPerThreadPercent - The value for maxWorkersPerThreadPercentthis builder for chained invocationpublic final WorkerToolDescriptionArg.Builder setMaxWorkersPerThreadPercent(Optional<Integer> maxWorkersPerThreadPercent)
maxWorkersPerThreadPercent to maxWorkersPerThreadPercent.maxWorkersPerThreadPercent - The value for maxWorkersPerThreadPercentthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setPersistent(boolean persistent)
persistent to persistent.persistent - The value for persistentthis builder for chained invocationpublic final WorkerToolDescriptionArg.Builder setPersistent(Optional<Boolean> persistent)
persistent to persistent.persistent - The value for persistentthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setSoloAsync(boolean soloAsync)
soloAsync to soloAsync.soloAsync - The value for soloAsyncthis builder for chained invocationpublic final WorkerToolDescriptionArg.Builder setSoloAsync(Optional<Boolean> soloAsync)
soloAsync to soloAsync.soloAsync - The value for soloAsyncthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addLicenses(SourcePath element)
licenses set.element - A licenses elementthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses set.elements - An array of licenses elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses set.elements - An iterable of licenses elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses set.elements - An iterable of licenses elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addLabels(String element)
labels sortedSet.element - A labels elementthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addLabels(String... elements)
labels sortedSet.elements - An array of labels elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setLabels(Iterable<String> elements)
labels sortedSet.elements - An iterable of labels elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels sortedSet.elements - An iterable of labels elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform to defaultTargetPlatform.defaultTargetPlatform - The value for defaultTargetPlatformthis builder for chained invocationpublic final WorkerToolDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform to defaultTargetPlatform.defaultTargetPlatform - The value for defaultTargetPlatformthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith list.element - A compatibleWith elementthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith list.elements - An array of compatibleWith elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith list.elements - An iterable of compatibleWith elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith list.elements - An iterable of compatibleWith elementsthis builder for use in a chained invocationpublic final WorkerToolDescriptionArg.Builder setName(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic WorkerToolDescriptionArg build()
WorkerToolDescriptionArg.IllegalStateException - if any required attributes are missing