Class PrebuiltPythonLibraryDescriptionArg.Builder
- java.lang.Object
-
- com.facebook.buck.features.python.PrebuiltPythonLibraryDescriptionArg.Builder
-
- Enclosing class:
- PrebuiltPythonLibraryDescriptionArg
@NotThreadSafe public static final class PrebuiltPythonLibraryDescriptionArg.Builder extends Object
Builds instances of typePrebuiltPythonLibraryDescriptionArg
. 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
-
-
-
Method Detail
-
from
public final PrebuiltPythonLibraryDescriptionArg.Builder from(PrebuiltPythonLibraryDescriptionArg instance)
Fill a builder with attribute values from the providedPrebuiltPythonLibraryDescriptionArg
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final PrebuiltPythonLibraryDescriptionArg.Builder from(com.facebook.buck.features.python.PrebuiltPythonLibraryDescription.AbstractPrebuiltPythonLibraryDescriptionArg instance)
Copy abstract value typeAbstractPrebuiltPythonLibraryDescriptionArg
instance into builder.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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
-
setBinarySrc
public final PrebuiltPythonLibraryDescriptionArg.Builder setBinarySrc(SourcePath binarySrc)
Initializes the value for thebinarySrc
attribute.- Parameters:
binarySrc
- The value for binarySrc- Returns:
this
builder for use in a chained invocation
-
setExcludeDepsFromMergedLinking
public final PrebuiltPythonLibraryDescriptionArg.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
-
setIgnoreCompileErrors
public final PrebuiltPythonLibraryDescriptionArg.Builder setIgnoreCompileErrors(boolean ignoreCompileErrors)
Initializes the value for theignoreCompileErrors
attribute.If not set, this attribute will have a default value as returned by the initializer of
ignoreCompileErrors
.- Parameters:
ignoreCompileErrors
- The value for ignoreCompileErrors- Returns:
this
builder for use in a chained invocation
-
setCompile
public final PrebuiltPythonLibraryDescriptionArg.Builder setCompile(boolean compile)
Initializes the value for thecompile
attribute.If not set, this attribute will have a default value as returned by the initializer of
compile
.- Parameters:
compile
- The value for compile- Returns:
this
builder for use in a chained invocation
-
addCompatibleWith
public final PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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 PrebuiltPythonLibraryDescriptionArg.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
-
build
public PrebuiltPythonLibraryDescriptionArg build()
Builds a newPrebuiltPythonLibraryDescriptionArg
.- Returns:
- An immutable instance of PrebuiltPythonLibraryDescriptionArg
- Throws:
IllegalStateException
- if any required attributes are missing
-
-