@NotThreadSafe public static final class PythonLibraryDescriptionArg.Builder extends Object
PythonLibraryDescriptionArg
.
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.
public final PythonLibraryDescriptionArg.Builder from(com.facebook.buck.features.python.PythonLibraryDescription.CoreArg instance)
com.facebook.buck.features.python.PythonLibraryDescription.CoreArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.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 PythonLibraryDescriptionArg.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 PythonLibraryDescriptionArg.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 PythonLibraryDescriptionArg.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 PythonLibraryDescriptionArg.Builder from(PythonLibraryDescriptionArg instance)
PythonLibraryDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder from(com.facebook.buck.features.python.PythonLibraryDescription.AbstractPythonLibraryDescriptionArg instance)
AbstractPythonLibraryDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.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 PythonLibraryDescriptionArg.Builder setVersionedSrcs(VersionMatchedCollection<SourceSortedSet> versionedSrcs)
versionedSrcs
to versionedSrcs.versionedSrcs
- The value for versionedSrcsthis
builder for chained invocationpublic final PythonLibraryDescriptionArg.Builder setVersionedSrcs(Optional<? extends VersionMatchedCollection<SourceSortedSet>> versionedSrcs)
versionedSrcs
to versionedSrcs.versionedSrcs
- The value for versionedSrcsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setPlatformSrcs(PatternMatchedCollection<SourceSortedSet> platformSrcs)
platformSrcs
attribute.
If not set, this attribute will have a default value as returned by the initializer of platformSrcs
.
platformSrcs
- The value for platformSrcsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setResources(SourceSortedSet resources)
resources
attribute.
If not set, this attribute will have a default value as returned by the initializer of resources
.
resources
- The value for resourcesthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setVersionedResources(VersionMatchedCollection<SourceSortedSet> versionedResources)
versionedResources
to versionedResources.versionedResources
- The value for versionedResourcesthis
builder for chained invocationpublic final PythonLibraryDescriptionArg.Builder setVersionedResources(Optional<? extends VersionMatchedCollection<SourceSortedSet>> versionedResources)
versionedResources
to versionedResources.versionedResources
- The value for versionedResourcesthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setPlatformResources(PatternMatchedCollection<SourceSortedSet> platformResources)
platformResources
attribute.
If not set, this attribute will have a default value as returned by the initializer of platformResources
.
platformResources
- The value for platformResourcesthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.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 PythonLibraryDescriptionArg.Builder setBaseModule(String baseModule)
baseModule
to baseModule.baseModule
- The value for baseModulethis
builder for chained invocationpublic final PythonLibraryDescriptionArg.Builder setBaseModule(Optional<String> baseModule)
baseModule
to baseModule.baseModule
- The value for baseModulethis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setZipSafe(boolean zipSafe)
zipSafe
to zipSafe.zipSafe
- The value for zipSafethis
builder for chained invocationpublic final PythonLibraryDescriptionArg.Builder setZipSafe(Optional<Boolean> zipSafe)
zipSafe
to zipSafe.zipSafe
- The value for zipSafethis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setExcludeDepsFromMergedLinking(boolean excludeDepsFromMergedLinking)
excludeDepsFromMergedLinking
attribute.
If not set, this attribute will have a default value as returned by the initializer of excludeDepsFromMergedLinking
.
excludeDepsFromMergedLinking
- The value for excludeDepsFromMergedLinkingthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final PythonLibraryDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addTests(BuildTarget element)
tests
sortedSet.element
- A tests elementthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addTests(BuildTarget... elements)
tests
sortedSet.elements
- An array of tests elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder setTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic final PythonLibraryDescriptionArg.Builder addAllTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic PythonLibraryDescriptionArg build()
PythonLibraryDescriptionArg
.IllegalStateException
- if any required attributes are missing