@NotThreadSafe public static final class LuaLibraryDescriptionArg.Builder extends Object
LuaLibraryDescriptionArg
.
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 |
---|---|
LuaLibraryDescriptionArg.Builder |
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
compatibleWith list. |
LuaLibraryDescriptionArg.Builder |
addAllDeps(Iterable<? extends BuildTarget> elements)
Adds elements to
deps sortedSet. |
LuaLibraryDescriptionArg.Builder |
addAllLabels(Iterable<String> elements)
Adds elements to
labels sortedSet. |
LuaLibraryDescriptionArg.Builder |
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements to
licenses set. |
LuaLibraryDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements to
compatibleWith list. |
LuaLibraryDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element to
compatibleWith list. |
LuaLibraryDescriptionArg.Builder |
addDeps(BuildTarget... elements)
Adds elements to
deps sortedSet. |
LuaLibraryDescriptionArg.Builder |
addDeps(BuildTarget element)
Adds one element to
deps sortedSet. |
LuaLibraryDescriptionArg.Builder |
addLabels(String... elements)
Adds elements to
labels sortedSet. |
LuaLibraryDescriptionArg.Builder |
addLabels(String element)
Adds one element to
labels sortedSet. |
LuaLibraryDescriptionArg.Builder |
addLicenses(SourcePath... elements)
Adds elements to
licenses set. |
LuaLibraryDescriptionArg.Builder |
addLicenses(SourcePath element)
Adds one element to
licenses set. |
LuaLibraryDescriptionArg |
build()
Builds a new
LuaLibraryDescriptionArg . |
LuaLibraryDescriptionArg.Builder |
from(BuildRuleArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.BuildRuleArg instance. |
LuaLibraryDescriptionArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
LuaLibraryDescriptionArg.Builder |
from(HasDeclaredDeps instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasDeclaredDeps instance. |
LuaLibraryDescriptionArg.Builder |
from(com.facebook.buck.features.lua.LuaLibraryDescription.AbstractLuaLibraryDescriptionArg instance)
Copy abstract value type
AbstractLuaLibraryDescriptionArg instance into builder. |
LuaLibraryDescriptionArg.Builder |
from(LuaLibraryDescriptionArg instance)
Fill a builder with attribute values from the provided
LuaLibraryDescriptionArg instance. |
LuaLibraryDescriptionArg.Builder |
setBaseModule(Optional<String> baseModule)
Initializes the optional value
baseModule to baseModule. |
LuaLibraryDescriptionArg.Builder |
setBaseModule(String baseModule)
Initializes the optional value
baseModule to baseModule. |
LuaLibraryDescriptionArg.Builder |
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
compatibleWith list. |
LuaLibraryDescriptionArg.Builder |
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
LuaLibraryDescriptionArg.Builder |
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
LuaLibraryDescriptionArg.Builder |
setDeps(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements for
deps sortedSet. |
LuaLibraryDescriptionArg.Builder |
setLabels(Iterable<String> elements)
Sets or replaces all elements for
labels sortedSet. |
LuaLibraryDescriptionArg.Builder |
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
licenses set. |
LuaLibraryDescriptionArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
LuaLibraryDescriptionArg.Builder |
setPlatformDeps(PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<BuildTarget>> platformDeps)
Initializes the value for the
platformDeps attribute. |
LuaLibraryDescriptionArg.Builder |
setSrcs(SourceSortedSet srcs)
Initializes the value for the
srcs attribute. |
public final LuaLibraryDescriptionArg.Builder from(LuaLibraryDescriptionArg instance)
LuaLibraryDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder from(com.facebook.buck.features.lua.LuaLibraryDescription.AbstractLuaLibraryDescriptionArg instance)
AbstractLuaLibraryDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.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 LuaLibraryDescriptionArg.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 LuaLibraryDescriptionArg.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 LuaLibraryDescriptionArg.Builder setSrcs(SourceSortedSet 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 LuaLibraryDescriptionArg.Builder setBaseModule(String baseModule)
baseModule
to baseModule.baseModule
- The value for baseModulethis
builder for chained invocationpublic final LuaLibraryDescriptionArg.Builder setBaseModule(Optional<String> baseModule)
baseModule
to baseModule.baseModule
- The value for baseModulethis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder setPlatformDeps(PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<BuildTarget>> platformDeps)
platformDeps
attribute.
If not set, this attribute will have a default value as returned by the initializer of platformDeps
.
platformDeps
- The value for platformDepsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final LuaLibraryDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final LuaLibraryDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic LuaLibraryDescriptionArg build()
LuaLibraryDescriptionArg
.IllegalStateException
- if any required attributes are missing