Class PythonLibraryDescriptionArg.Builder
- java.lang.Object
-
- com.facebook.buck.features.python.PythonLibraryDescriptionArg.Builder
-
- Enclosing class:
- PythonLibraryDescriptionArg
@NotThreadSafe public static final class PythonLibraryDescriptionArg.Builder extends Object
Builds instances of typePythonLibraryDescriptionArg
. Initialize attributes and then invoke thebuild()
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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PythonLibraryDescriptionArg.Builder
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements tocompatibleWith
list.PythonLibraryDescriptionArg.Builder
addAllDeps(Iterable<? extends BuildTarget> elements)
Adds elements todeps
sortedSet.PythonLibraryDescriptionArg.Builder
addAllLabels(Iterable<String> elements)
Adds elements tolabels
sortedSet.PythonLibraryDescriptionArg.Builder
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements tolicenses
set.PythonLibraryDescriptionArg.Builder
addAllTests(Iterable<? extends BuildTarget> elements)
Adds elements totests
sortedSet.PythonLibraryDescriptionArg.Builder
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element tocompatibleWith
list.PythonLibraryDescriptionArg.Builder
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements tocompatibleWith
list.PythonLibraryDescriptionArg.Builder
addDeps(BuildTarget element)
Adds one element todeps
sortedSet.PythonLibraryDescriptionArg.Builder
addDeps(BuildTarget... elements)
Adds elements todeps
sortedSet.PythonLibraryDescriptionArg.Builder
addLabels(String element)
Adds one element tolabels
sortedSet.PythonLibraryDescriptionArg.Builder
addLabels(String... elements)
Adds elements tolabels
sortedSet.PythonLibraryDescriptionArg.Builder
addLicenses(SourcePath element)
Adds one element tolicenses
set.PythonLibraryDescriptionArg.Builder
addLicenses(SourcePath... elements)
Adds elements tolicenses
set.PythonLibraryDescriptionArg.Builder
addTests(BuildTarget element)
Adds one element totests
sortedSet.PythonLibraryDescriptionArg.Builder
addTests(BuildTarget... elements)
Adds elements totests
sortedSet.PythonLibraryDescriptionArg
build()
Builds a newPythonLibraryDescriptionArg
.PythonLibraryDescriptionArg.Builder
from(BuildRuleArg instance)
Fill a builder with attribute values from the providedcom.facebook.buck.core.description.arg.BuildRuleArg
instance.PythonLibraryDescriptionArg.Builder
from(ConstructorArg instance)
Fill a builder with attribute values from the providedcom.facebook.buck.core.description.arg.ConstructorArg
instance.PythonLibraryDescriptionArg.Builder
from(HasDeclaredDeps instance)
Fill a builder with attribute values from the providedcom.facebook.buck.core.description.arg.HasDeclaredDeps
instance.PythonLibraryDescriptionArg.Builder
from(HasTests instance)
Fill a builder with attribute values from the providedcom.facebook.buck.core.description.arg.HasTests
instance.PythonLibraryDescriptionArg.Builder
from(com.facebook.buck.features.python.PythonLibraryDescription.AbstractPythonLibraryDescriptionArg instance)
Copy abstract value typeAbstractPythonLibraryDescriptionArg
instance into builder.PythonLibraryDescriptionArg.Builder
from(com.facebook.buck.features.python.PythonLibraryDescription.CoreArg instance)
Fill a builder with attribute values from the providedcom.facebook.buck.features.python.PythonLibraryDescription.CoreArg
instance.PythonLibraryDescriptionArg.Builder
from(PythonLibraryDescriptionArg instance)
Fill a builder with attribute values from the providedPythonLibraryDescriptionArg
instance.PythonLibraryDescriptionArg.Builder
setBaseModule(String baseModule)
Initializes the optional valuebaseModule
to baseModule.PythonLibraryDescriptionArg.Builder
setBaseModule(Optional<String> baseModule)
Initializes the optional valuebaseModule
to baseModule.PythonLibraryDescriptionArg.Builder
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements forcompatibleWith
list.PythonLibraryDescriptionArg.Builder
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional valuedefaultTargetPlatform
to defaultTargetPlatform.PythonLibraryDescriptionArg.Builder
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional valuedefaultTargetPlatform
to defaultTargetPlatform.PythonLibraryDescriptionArg.Builder
setDeps(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements fordeps
sortedSet.PythonLibraryDescriptionArg.Builder
setExcludeDepsFromMergedLinking(boolean excludeDepsFromMergedLinking)
Initializes the value for theexcludeDepsFromMergedLinking
attribute.PythonLibraryDescriptionArg.Builder
setLabels(Iterable<String> elements)
Sets or replaces all elements forlabels
sortedSet.PythonLibraryDescriptionArg.Builder
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements forlicenses
set.PythonLibraryDescriptionArg.Builder
setName(String name)
Initializes the value for thename
attribute.PythonLibraryDescriptionArg.Builder
setPlatformDeps(PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<BuildTarget>> platformDeps)
Initializes the value for theplatformDeps
attribute.PythonLibraryDescriptionArg.Builder
setPlatformResources(PatternMatchedCollection<SourceSortedSet> platformResources)
Initializes the value for theplatformResources
attribute.PythonLibraryDescriptionArg.Builder
setPlatformSrcs(PatternMatchedCollection<SourceSortedSet> platformSrcs)
Initializes the value for theplatformSrcs
attribute.PythonLibraryDescriptionArg.Builder
setResources(SourceSortedSet resources)
Initializes the value for theresources
attribute.PythonLibraryDescriptionArg.Builder
setSrcs(SourceSortedSet srcs)
Initializes the value for thesrcs
attribute.PythonLibraryDescriptionArg.Builder
setTests(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements fortests
sortedSet.PythonLibraryDescriptionArg.Builder
setVersionedResources(VersionMatchedCollection<SourceSortedSet> versionedResources)
Initializes the optional valueversionedResources
to versionedResources.PythonLibraryDescriptionArg.Builder
setVersionedResources(Optional<? extends VersionMatchedCollection<SourceSortedSet>> versionedResources)
Initializes the optional valueversionedResources
to versionedResources.PythonLibraryDescriptionArg.Builder
setVersionedSrcs(VersionMatchedCollection<SourceSortedSet> versionedSrcs)
Initializes the optional valueversionedSrcs
to versionedSrcs.PythonLibraryDescriptionArg.Builder
setVersionedSrcs(Optional<? extends VersionMatchedCollection<SourceSortedSet>> versionedSrcs)
Initializes the optional valueversionedSrcs
to versionedSrcs.PythonLibraryDescriptionArg.Builder
setZipSafe(boolean zipSafe)
Initializes the optional valuezipSafe
to zipSafe.PythonLibraryDescriptionArg.Builder
setZipSafe(Optional<Boolean> zipSafe)
Initializes the optional valuezipSafe
to zipSafe.
-
-
-
Method Detail
-
from
public final PythonLibraryDescriptionArg.Builder from(com.facebook.buck.features.python.PythonLibraryDescription.CoreArg instance)
Fill a builder with attribute values from the providedcom.facebook.buck.features.python.PythonLibraryDescription.CoreArg
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final PythonLibraryDescriptionArg.Builder from(HasDeclaredDeps instance)
Fill a builder with attribute values from the providedcom.facebook.buck.core.description.arg.HasDeclaredDeps
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final PythonLibraryDescriptionArg.Builder from(HasTests instance)
Fill a builder with attribute values from the providedcom.facebook.buck.core.description.arg.HasTests
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final PythonLibraryDescriptionArg.Builder from(BuildRuleArg instance)
Fill a builder with attribute values from the providedcom.facebook.buck.core.description.arg.BuildRuleArg
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final PythonLibraryDescriptionArg.Builder from(ConstructorArg instance)
Fill a builder with attribute values from the providedcom.facebook.buck.core.description.arg.ConstructorArg
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final PythonLibraryDescriptionArg.Builder from(PythonLibraryDescriptionArg instance)
Fill a builder with attribute values from the providedPythonLibraryDescriptionArg
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final PythonLibraryDescriptionArg.Builder from(com.facebook.buck.features.python.PythonLibraryDescription.AbstractPythonLibraryDescriptionArg instance)
Copy abstract value typeAbstractPythonLibraryDescriptionArg
instance into builder.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setSrcs
public final PythonLibraryDescriptionArg.Builder setSrcs(SourceSortedSet srcs)
Initializes the value for thesrcs
attribute.If not set, this attribute will have a default value as returned by the initializer of
srcs
.- Parameters:
srcs
- The value for srcs- Returns:
this
builder for use in a chained invocation
-
setVersionedSrcs
public final PythonLibraryDescriptionArg.Builder setVersionedSrcs(VersionMatchedCollection<SourceSortedSet> versionedSrcs)
Initializes the optional valueversionedSrcs
to versionedSrcs.- Parameters:
versionedSrcs
- The value for versionedSrcs- Returns:
this
builder for chained invocation
-
setVersionedSrcs
public final PythonLibraryDescriptionArg.Builder setVersionedSrcs(Optional<? extends VersionMatchedCollection<SourceSortedSet>> versionedSrcs)
Initializes the optional valueversionedSrcs
to versionedSrcs.- Parameters:
versionedSrcs
- The value for versionedSrcs- Returns:
this
builder for use in a chained invocation
-
setPlatformSrcs
public final PythonLibraryDescriptionArg.Builder setPlatformSrcs(PatternMatchedCollection<SourceSortedSet> platformSrcs)
Initializes the value for theplatformSrcs
attribute.If not set, this attribute will have a default value as returned by the initializer of
platformSrcs
.- Parameters:
platformSrcs
- The value for platformSrcs- Returns:
this
builder for use in a chained invocation
-
setResources
public final PythonLibraryDescriptionArg.Builder setResources(SourceSortedSet resources)
Initializes the value for theresources
attribute.If not set, this attribute will have a default value as returned by the initializer of
resources
.- Parameters:
resources
- The value for resources- Returns:
this
builder for use in a chained invocation
-
setVersionedResources
public final PythonLibraryDescriptionArg.Builder setVersionedResources(VersionMatchedCollection<SourceSortedSet> versionedResources)
Initializes the optional valueversionedResources
to versionedResources.- Parameters:
versionedResources
- The value for versionedResources- Returns:
this
builder for chained invocation
-
setVersionedResources
public final PythonLibraryDescriptionArg.Builder setVersionedResources(Optional<? extends VersionMatchedCollection<SourceSortedSet>> versionedResources)
Initializes the optional valueversionedResources
to versionedResources.- Parameters:
versionedResources
- The value for versionedResources- Returns:
this
builder for use in a chained invocation
-
setPlatformResources
public final PythonLibraryDescriptionArg.Builder setPlatformResources(PatternMatchedCollection<SourceSortedSet> platformResources)
Initializes the value for theplatformResources
attribute.If not set, this attribute will have a default value as returned by the initializer of
platformResources
.- Parameters:
platformResources
- The value for platformResources- Returns:
this
builder for use in a chained invocation
-
setPlatformDeps
public final PythonLibraryDescriptionArg.Builder setPlatformDeps(PatternMatchedCollection<com.google.common.collect.ImmutableSortedSet<BuildTarget>> platformDeps)
Initializes the value for theplatformDeps
attribute.If not set, this attribute will have a default value as returned by the initializer of
platformDeps
.- Parameters:
platformDeps
- The value for platformDeps- Returns:
this
builder for use in a chained invocation
-
setBaseModule
public final PythonLibraryDescriptionArg.Builder setBaseModule(String baseModule)
Initializes the optional valuebaseModule
to baseModule.- Parameters:
baseModule
- The value for baseModule- Returns:
this
builder for chained invocation
-
setBaseModule
public final PythonLibraryDescriptionArg.Builder setBaseModule(Optional<String> baseModule)
Initializes the optional valuebaseModule
to baseModule.- Parameters:
baseModule
- The value for baseModule- Returns:
this
builder for use in a chained invocation
-
setZipSafe
public final PythonLibraryDescriptionArg.Builder setZipSafe(boolean zipSafe)
Initializes the optional valuezipSafe
to zipSafe.- Parameters:
zipSafe
- The value for zipSafe- Returns:
this
builder for chained invocation
-
setZipSafe
public final PythonLibraryDescriptionArg.Builder setZipSafe(Optional<Boolean> zipSafe)
Initializes the optional valuezipSafe
to zipSafe.- Parameters:
zipSafe
- The value for zipSafe- Returns:
this
builder for use in a chained invocation
-
setExcludeDepsFromMergedLinking
public final PythonLibraryDescriptionArg.Builder setExcludeDepsFromMergedLinking(boolean excludeDepsFromMergedLinking)
Initializes the value for theexcludeDepsFromMergedLinking
attribute.If not set, this attribute will have a default value as returned by the initializer of
excludeDepsFromMergedLinking
.- Parameters:
excludeDepsFromMergedLinking
- The value for excludeDepsFromMergedLinking- Returns:
this
builder for use in a chained invocation
-
addCompatibleWith
public final PythonLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element tocompatibleWith
list.- Parameters:
element
- A compatibleWith element- Returns:
this
builder for use in a chained invocation
-
addCompatibleWith
public final PythonLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements tocompatibleWith
list.- Parameters:
elements
- An array of compatibleWith elements- Returns:
this
builder for use in a chained invocation
-
setCompatibleWith
public final PythonLibraryDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements forcompatibleWith
list.- Parameters:
elements
- An iterable of compatibleWith elements- Returns:
this
builder for use in a chained invocation
-
addAllCompatibleWith
public final PythonLibraryDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements tocompatibleWith
list.- Parameters:
elements
- An iterable of compatibleWith elements- Returns:
this
builder for use in a chained invocation
-
setDefaultTargetPlatform
public final PythonLibraryDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional valuedefaultTargetPlatform
to defaultTargetPlatform.- Parameters:
defaultTargetPlatform
- The value for defaultTargetPlatform- Returns:
this
builder for chained invocation
-
setDefaultTargetPlatform
public final PythonLibraryDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional valuedefaultTargetPlatform
to defaultTargetPlatform.- Parameters:
defaultTargetPlatform
- The value for defaultTargetPlatform- Returns:
this
builder for use in a chained invocation
-
addLabels
public final PythonLibraryDescriptionArg.Builder addLabels(String element)
Adds one element tolabels
sortedSet.- Parameters:
element
- A labels element- Returns:
this
builder for use in a chained invocation
-
addLabels
public final PythonLibraryDescriptionArg.Builder addLabels(String... elements)
Adds elements tolabels
sortedSet.- Parameters:
elements
- An array of labels elements- Returns:
this
builder for use in a chained invocation
-
setLabels
public final PythonLibraryDescriptionArg.Builder setLabels(Iterable<String> elements)
Sets or replaces all elements forlabels
sortedSet.- Parameters:
elements
- An iterable of labels elements- Returns:
this
builder for use in a chained invocation
-
addAllLabels
public final PythonLibraryDescriptionArg.Builder addAllLabels(Iterable<String> elements)
Adds elements tolabels
sortedSet.- Parameters:
elements
- An iterable of labels elements- Returns:
this
builder for use in a chained invocation
-
addLicenses
public final PythonLibraryDescriptionArg.Builder addLicenses(SourcePath element)
Adds one element tolicenses
set.- Parameters:
element
- A licenses element- Returns:
this
builder for use in a chained invocation
-
addLicenses
public final PythonLibraryDescriptionArg.Builder addLicenses(SourcePath... elements)
Adds elements tolicenses
set.- Parameters:
elements
- An array of licenses elements- Returns:
this
builder for use in a chained invocation
-
setLicenses
public final PythonLibraryDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements forlicenses
set.- Parameters:
elements
- An iterable of licenses elements- Returns:
this
builder for use in a chained invocation
-
addAllLicenses
public final PythonLibraryDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements tolicenses
set.- Parameters:
elements
- An iterable of licenses elements- Returns:
this
builder for use in a chained invocation
-
setName
public final PythonLibraryDescriptionArg.Builder setName(String name)
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
addDeps
public final PythonLibraryDescriptionArg.Builder addDeps(BuildTarget element)
Adds one element todeps
sortedSet.- Parameters:
element
- A deps element- Returns:
this
builder for use in a chained invocation
-
addDeps
public final PythonLibraryDescriptionArg.Builder addDeps(BuildTarget... elements)
Adds elements todeps
sortedSet.- Parameters:
elements
- An array of deps elements- Returns:
this
builder for use in a chained invocation
-
setDeps
public final PythonLibraryDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements fordeps
sortedSet.- Parameters:
elements
- An iterable of deps elements- Returns:
this
builder for use in a chained invocation
-
addAllDeps
public final PythonLibraryDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
Adds elements todeps
sortedSet.- Parameters:
elements
- An iterable of deps elements- Returns:
this
builder for use in a chained invocation
-
addTests
public final PythonLibraryDescriptionArg.Builder addTests(BuildTarget element)
Adds one element totests
sortedSet.- Parameters:
element
- A tests element- Returns:
this
builder for use in a chained invocation
-
addTests
public final PythonLibraryDescriptionArg.Builder addTests(BuildTarget... elements)
Adds elements totests
sortedSet.- Parameters:
elements
- An array of tests elements- Returns:
this
builder for use in a chained invocation
-
setTests
public final PythonLibraryDescriptionArg.Builder setTests(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements fortests
sortedSet.- Parameters:
elements
- An iterable of tests elements- Returns:
this
builder for use in a chained invocation
-
addAllTests
public final PythonLibraryDescriptionArg.Builder addAllTests(Iterable<? extends BuildTarget> elements)
Adds elements totests
sortedSet.- Parameters:
elements
- An iterable of tests elements- Returns:
this
builder for use in a chained invocation
-
build
public PythonLibraryDescriptionArg build()
Builds a newPythonLibraryDescriptionArg
.- Returns:
- An immutable instance of PythonLibraryDescriptionArg
- Throws:
IllegalStateException
- if any required attributes are missing
-
-