@NotThreadSafe public static final class JsLibraryDescriptionArg.Builder extends Object
JsLibraryDescriptionArg
.
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 |
---|---|
JsLibraryDescriptionArg.Builder |
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
compatibleWith list. |
JsLibraryDescriptionArg.Builder |
addAllDeps(Iterable<? extends BuildTarget> elements)
Adds elements to
deps sortedSet. |
JsLibraryDescriptionArg.Builder |
addAllLabels(Iterable<String> elements)
Adds elements to
labels sortedSet. |
JsLibraryDescriptionArg.Builder |
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements to
licenses set. |
JsLibraryDescriptionArg.Builder |
addAllSrcs(Iterable<? extends Either<SourcePath,Pair<SourcePath,String>>> elements)
Adds elements to
srcs set. |
JsLibraryDescriptionArg.Builder |
addAllTests(Iterable<? extends BuildTarget> elements)
Adds elements to
tests sortedSet. |
JsLibraryDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements to
compatibleWith list. |
JsLibraryDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element to
compatibleWith list. |
JsLibraryDescriptionArg.Builder |
addDeps(BuildTarget... elements)
Adds elements to
deps sortedSet. |
JsLibraryDescriptionArg.Builder |
addDeps(BuildTarget element)
Adds one element to
deps sortedSet. |
JsLibraryDescriptionArg.Builder |
addLabels(String... elements)
Adds elements to
labels sortedSet. |
JsLibraryDescriptionArg.Builder |
addLabels(String element)
Adds one element to
labels sortedSet. |
JsLibraryDescriptionArg.Builder |
addLicenses(SourcePath... elements)
Adds elements to
licenses set. |
JsLibraryDescriptionArg.Builder |
addLicenses(SourcePath element)
Adds one element to
licenses set. |
JsLibraryDescriptionArg.Builder |
addSrcs(Either<SourcePath,Pair<SourcePath,String>>... elements)
Adds elements to
srcs set. |
JsLibraryDescriptionArg.Builder |
addSrcs(Either<SourcePath,Pair<SourcePath,String>> element)
Adds one element to
srcs set. |
JsLibraryDescriptionArg.Builder |
addTests(BuildTarget... elements)
Adds elements to
tests sortedSet. |
JsLibraryDescriptionArg.Builder |
addTests(BuildTarget element)
Adds one element to
tests sortedSet. |
JsLibraryDescriptionArg |
build()
Builds a new
JsLibraryDescriptionArg . |
JsLibraryDescriptionArg.Builder |
from(BuildRuleArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.BuildRuleArg instance. |
JsLibraryDescriptionArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
JsLibraryDescriptionArg.Builder |
from(HasDeclaredDeps instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasDeclaredDeps instance. |
JsLibraryDescriptionArg.Builder |
from(HasDepsQuery instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasDepsQuery instance. |
JsLibraryDescriptionArg.Builder |
from(HasExtraJson instance)
Fill a builder with attribute values from the provided
com.facebook.buck.features.js.HasExtraJson instance. |
JsLibraryDescriptionArg.Builder |
from(HasTests instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasTests instance. |
JsLibraryDescriptionArg.Builder |
from(com.facebook.buck.features.js.JsLibraryDescription.AbstractJsLibraryDescriptionArg instance)
Copy abstract value type
AbstractJsLibraryDescriptionArg instance into builder. |
JsLibraryDescriptionArg.Builder |
from(JsLibraryDescriptionArg instance)
Fill a builder with attribute values from the provided
JsLibraryDescriptionArg instance. |
JsLibraryDescriptionArg.Builder |
setBasePath(Optional<String> basePath)
Initializes the optional value
basePath to basePath. |
JsLibraryDescriptionArg.Builder |
setBasePath(String basePath)
Initializes the optional value
basePath to basePath. |
JsLibraryDescriptionArg.Builder |
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
compatibleWith list. |
JsLibraryDescriptionArg.Builder |
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
JsLibraryDescriptionArg.Builder |
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
JsLibraryDescriptionArg.Builder |
setDeps(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements for
deps sortedSet. |
JsLibraryDescriptionArg.Builder |
setDepsQuery(Optional<? extends Query> depsQuery)
Initializes the optional value
depsQuery to depsQuery. |
JsLibraryDescriptionArg.Builder |
setDepsQuery(Query depsQuery)
Initializes the optional value
depsQuery to depsQuery. |
JsLibraryDescriptionArg.Builder |
setExtraJson(Optional<? extends StringWithMacros> extraJson)
Initializes the optional value
extraJson to extraJson. |
JsLibraryDescriptionArg.Builder |
setExtraJson(StringWithMacros extraJson)
Initializes the optional value
extraJson to extraJson. |
JsLibraryDescriptionArg.Builder |
setLabels(Iterable<String> elements)
Sets or replaces all elements for
labels sortedSet. |
JsLibraryDescriptionArg.Builder |
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
licenses set. |
JsLibraryDescriptionArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
JsLibraryDescriptionArg.Builder |
setSrcs(Iterable<? extends Either<SourcePath,Pair<SourcePath,String>>> elements)
Sets or replaces all elements for
srcs set. |
JsLibraryDescriptionArg.Builder |
setTests(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements for
tests sortedSet. |
JsLibraryDescriptionArg.Builder |
setWorker(BuildTarget worker)
Initializes the value for the
worker attribute. |
public final JsLibraryDescriptionArg.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 JsLibraryDescriptionArg.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 JsLibraryDescriptionArg.Builder from(HasDepsQuery instance)
com.facebook.buck.core.description.arg.HasDepsQuery
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder from(HasExtraJson instance)
com.facebook.buck.features.js.HasExtraJson
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.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 JsLibraryDescriptionArg.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 JsLibraryDescriptionArg.Builder from(JsLibraryDescriptionArg instance)
JsLibraryDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder from(com.facebook.buck.features.js.JsLibraryDescription.AbstractJsLibraryDescriptionArg instance)
AbstractJsLibraryDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addSrcs(Either<SourcePath,Pair<SourcePath,String>> element)
srcs
set.element
- A srcs elementthis
builder for use in a chained invocation@SafeVarargs public final JsLibraryDescriptionArg.Builder addSrcs(Either<SourcePath,Pair<SourcePath,String>>... elements)
srcs
set.elements
- An array of srcs elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setSrcs(Iterable<? extends Either<SourcePath,Pair<SourcePath,String>>> elements)
srcs
set.elements
- An iterable of srcs elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addAllSrcs(Iterable<? extends Either<SourcePath,Pair<SourcePath,String>>> elements)
srcs
set.elements
- An iterable of srcs elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setWorker(BuildTarget worker)
worker
attribute.worker
- The value for workerthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setBasePath(String basePath)
basePath
to basePath.basePath
- The value for basePaththis
builder for chained invocationpublic final JsLibraryDescriptionArg.Builder setBasePath(Optional<String> basePath)
basePath
to basePath.basePath
- The value for basePaththis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final JsLibraryDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setDepsQuery(Query depsQuery)
depsQuery
to depsQuery.depsQuery
- The value for depsQuerythis
builder for chained invocationpublic final JsLibraryDescriptionArg.Builder setDepsQuery(Optional<? extends Query> depsQuery)
depsQuery
to depsQuery.depsQuery
- The value for depsQuerythis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setExtraJson(StringWithMacros extraJson)
extraJson
to extraJson.extraJson
- The value for extraJsonthis
builder for chained invocationpublic final JsLibraryDescriptionArg.Builder setExtraJson(Optional<? extends StringWithMacros> extraJson)
extraJson
to extraJson.extraJson
- The value for extraJsonthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addTests(BuildTarget element)
tests
sortedSet.element
- A tests elementthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addTests(BuildTarget... elements)
tests
sortedSet.elements
- An array of tests elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder setTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic final JsLibraryDescriptionArg.Builder addAllTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic JsLibraryDescriptionArg build()
JsLibraryDescriptionArg
.IllegalStateException
- if any required attributes are missing