@NotThreadSafe public static final class ShTestDescriptionArg.Builder extends Object
ShTestDescriptionArg
.
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 |
---|---|
ShTestDescriptionArg.Builder |
addAllArgs(Iterable<? extends StringWithMacros> elements)
Adds elements to
args list. |
ShTestDescriptionArg.Builder |
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
compatibleWith list. |
ShTestDescriptionArg.Builder |
addAllContacts(Iterable<String> elements)
Adds elements to
contacts sortedSet. |
ShTestDescriptionArg.Builder |
addAllDeps(Iterable<? extends BuildTarget> elements)
Adds elements to
deps sortedSet. |
ShTestDescriptionArg.Builder |
addAllLabels(Iterable<String> elements)
Adds elements to
labels sortedSet. |
ShTestDescriptionArg.Builder |
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements to
licenses set. |
ShTestDescriptionArg.Builder |
addAllResources(Iterable<? extends SourcePath> elements)
Adds elements to
resources sortedSet. |
ShTestDescriptionArg.Builder |
addArgs(StringWithMacros... elements)
Adds elements to
args list. |
ShTestDescriptionArg.Builder |
addArgs(StringWithMacros element)
Adds one element to
args list. |
ShTestDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements to
compatibleWith list. |
ShTestDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element to
compatibleWith list. |
ShTestDescriptionArg.Builder |
addContacts(String... elements)
Adds elements to
contacts sortedSet. |
ShTestDescriptionArg.Builder |
addContacts(String element)
Adds one element to
contacts sortedSet. |
ShTestDescriptionArg.Builder |
addDeps(BuildTarget... elements)
Adds elements to
deps sortedSet. |
ShTestDescriptionArg.Builder |
addDeps(BuildTarget element)
Adds one element to
deps sortedSet. |
ShTestDescriptionArg.Builder |
addLabels(String... elements)
Adds elements to
labels sortedSet. |
ShTestDescriptionArg.Builder |
addLabels(String element)
Adds one element to
labels sortedSet. |
ShTestDescriptionArg.Builder |
addLicenses(SourcePath... elements)
Adds elements to
licenses set. |
ShTestDescriptionArg.Builder |
addLicenses(SourcePath element)
Adds one element to
licenses set. |
ShTestDescriptionArg.Builder |
addResources(SourcePath... elements)
Adds elements to
resources sortedSet. |
ShTestDescriptionArg.Builder |
addResources(SourcePath element)
Adds one element to
resources sortedSet. |
ShTestDescriptionArg |
build()
Builds a new
ShTestDescriptionArg . |
ShTestDescriptionArg.Builder |
from(BuildRuleArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.BuildRuleArg instance. |
ShTestDescriptionArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
ShTestDescriptionArg.Builder |
from(HasContacts instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasContacts instance. |
ShTestDescriptionArg.Builder |
from(HasDeclaredDeps instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasDeclaredDeps instance. |
ShTestDescriptionArg.Builder |
from(HasTestTimeout instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasTestTimeout instance. |
ShTestDescriptionArg.Builder |
from(com.facebook.buck.shell.ShTestDescription.AbstractShTestDescriptionArg instance)
Copy abstract value type
AbstractShTestDescriptionArg instance into builder. |
ShTestDescriptionArg.Builder |
from(ShTestDescriptionArg instance)
Fill a builder with attribute values from the provided
ShTestDescriptionArg instance. |
ShTestDescriptionArg.Builder |
putAllEnv(Map<String,? extends StringWithMacros> entries)
Put all mappings from the specified map as entries to
env map. |
ShTestDescriptionArg.Builder |
putEnv(Map.Entry<String,? extends StringWithMacros> entry)
Put one entry to the
env map. |
ShTestDescriptionArg.Builder |
putEnv(String key,
StringWithMacros value)
Put one entry to the
env map. |
ShTestDescriptionArg.Builder |
setArgs(Iterable<? extends StringWithMacros> elements)
Sets or replaces all elements for
args list. |
ShTestDescriptionArg.Builder |
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
compatibleWith list. |
ShTestDescriptionArg.Builder |
setContacts(Iterable<String> elements)
Sets or replaces all elements for
contacts sortedSet. |
ShTestDescriptionArg.Builder |
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
ShTestDescriptionArg.Builder |
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
ShTestDescriptionArg.Builder |
setDeps(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements for
deps sortedSet. |
ShTestDescriptionArg.Builder |
setEnv(Map<String,? extends StringWithMacros> entries)
Sets or replaces all mappings from the specified map as entries for the
env map. |
ShTestDescriptionArg.Builder |
setLabels(Iterable<String> elements)
Sets or replaces all elements for
labels sortedSet. |
ShTestDescriptionArg.Builder |
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
licenses set. |
ShTestDescriptionArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
ShTestDescriptionArg.Builder |
setResources(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
resources sortedSet. |
ShTestDescriptionArg.Builder |
setRunTestSeparately(boolean runTestSeparately)
Initializes the value for the
runTestSeparately attribute. |
ShTestDescriptionArg.Builder |
setTest(Optional<? extends SourcePath> test)
Initializes the optional value
test to test. |
ShTestDescriptionArg.Builder |
setTest(SourcePath test)
Initializes the optional value
test to test. |
ShTestDescriptionArg.Builder |
setTestRuleTimeoutMs(long testRuleTimeoutMs)
Initializes the optional value
testRuleTimeoutMs to testRuleTimeoutMs. |
ShTestDescriptionArg.Builder |
setTestRuleTimeoutMs(Optional<Long> testRuleTimeoutMs)
Initializes the optional value
testRuleTimeoutMs to testRuleTimeoutMs. |
ShTestDescriptionArg.Builder |
setType(Optional<String> type)
Initializes the optional value
type to type. |
ShTestDescriptionArg.Builder |
setType(String type)
Initializes the optional value
type to type. |
public final ShTestDescriptionArg.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 ShTestDescriptionArg.Builder from(HasTestTimeout instance)
com.facebook.buck.core.description.arg.HasTestTimeout
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.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 ShTestDescriptionArg.Builder from(HasContacts instance)
com.facebook.buck.core.description.arg.HasContacts
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.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 ShTestDescriptionArg.Builder from(ShTestDescriptionArg instance)
ShTestDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder from(com.facebook.buck.shell.ShTestDescription.AbstractShTestDescriptionArg instance)
AbstractShTestDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setTest(SourcePath test)
test
to test.test
- The value for testthis
builder for chained invocationpublic final ShTestDescriptionArg.Builder setTest(Optional<? extends SourcePath> test)
test
to test.test
- The value for testthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addArgs(StringWithMacros element)
args
list.element
- A args elementthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addArgs(StringWithMacros... elements)
args
list.elements
- An array of args elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setArgs(Iterable<? extends StringWithMacros> elements)
args
list.elements
- An iterable of args elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addAllArgs(Iterable<? extends StringWithMacros> elements)
args
list.elements
- An iterable of args elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setType(String type)
type
to type.type
- The value for typethis
builder for chained invocationpublic final ShTestDescriptionArg.Builder setType(Optional<String> type)
type
to type.type
- The value for typethis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setRunTestSeparately(boolean runTestSeparately)
runTestSeparately
attribute.
If not set, this attribute will have a default value as returned by the initializer of runTestSeparately
.
runTestSeparately
- The value for runTestSeparatelythis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addResources(SourcePath element)
resources
sortedSet.element
- A resources elementthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addResources(SourcePath... elements)
resources
sortedSet.elements
- An array of resources elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setResources(Iterable<? extends SourcePath> elements)
resources
sortedSet.elements
- An iterable of resources elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addAllResources(Iterable<? extends SourcePath> elements)
resources
sortedSet.elements
- An iterable of resources elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.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 ShTestDescriptionArg.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 ShTestDescriptionArg.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 ShTestDescriptionArg.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 ShTestDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final ShTestDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addContacts(String element)
contacts
sortedSet.element
- A contacts elementthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addContacts(String... elements)
contacts
sortedSet.elements
- An array of contacts elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setContacts(Iterable<String> elements)
contacts
sortedSet.elements
- An iterable of contacts elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addAllContacts(Iterable<String> elements)
contacts
sortedSet.elements
- An iterable of contacts elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final ShTestDescriptionArg.Builder setTestRuleTimeoutMs(long testRuleTimeoutMs)
testRuleTimeoutMs
to testRuleTimeoutMs.testRuleTimeoutMs
- The value for testRuleTimeoutMsthis
builder for chained invocationpublic final ShTestDescriptionArg.Builder setTestRuleTimeoutMs(Optional<Long> testRuleTimeoutMs)
testRuleTimeoutMs
to testRuleTimeoutMs.testRuleTimeoutMs
- The value for testRuleTimeoutMsthis
builder for use in a chained invocationpublic ShTestDescriptionArg build()
ShTestDescriptionArg
.IllegalStateException
- if any required attributes are missing