@NotThreadSafe public static final class PrebuiltJarDescriptionArg.Builder extends Object
PrebuiltJarDescriptionArg
.
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 |
---|---|
PrebuiltJarDescriptionArg.Builder |
addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Adds elements to
compatibleWith list. |
PrebuiltJarDescriptionArg.Builder |
addAllDeps(Iterable<? extends BuildTarget> elements)
Adds elements to
deps sortedSet. |
PrebuiltJarDescriptionArg.Builder |
addAllLabels(Iterable<String> elements)
Adds elements to
labels sortedSet. |
PrebuiltJarDescriptionArg.Builder |
addAllLicenses(Iterable<? extends SourcePath> elements)
Adds elements to
licenses set. |
PrebuiltJarDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget... elements)
Adds elements to
compatibleWith list. |
PrebuiltJarDescriptionArg.Builder |
addCompatibleWith(UnconfiguredBuildTarget element)
Adds one element to
compatibleWith list. |
PrebuiltJarDescriptionArg.Builder |
addDeps(BuildTarget... elements)
Adds elements to
deps sortedSet. |
PrebuiltJarDescriptionArg.Builder |
addDeps(BuildTarget element)
Adds one element to
deps sortedSet. |
PrebuiltJarDescriptionArg.Builder |
addLabels(String... elements)
Adds elements to
labels sortedSet. |
PrebuiltJarDescriptionArg.Builder |
addLabels(String element)
Adds one element to
labels sortedSet. |
PrebuiltJarDescriptionArg.Builder |
addLicenses(SourcePath... elements)
Adds elements to
licenses set. |
PrebuiltJarDescriptionArg.Builder |
addLicenses(SourcePath element)
Adds one element to
licenses set. |
PrebuiltJarDescriptionArg |
build()
Builds a new
PrebuiltJarDescriptionArg . |
PrebuiltJarDescriptionArg.Builder |
from(BuildRuleArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.BuildRuleArg instance. |
PrebuiltJarDescriptionArg.Builder |
from(ConstructorArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.ConstructorArg instance. |
PrebuiltJarDescriptionArg.Builder |
from(HasDeclaredDeps instance)
Fill a builder with attribute values from the provided
com.facebook.buck.core.description.arg.HasDeclaredDeps instance. |
PrebuiltJarDescriptionArg.Builder |
from(MaybeRequiredForSourceOnlyAbiArg instance)
Fill a builder with attribute values from the provided
com.facebook.buck.jvm.java.MaybeRequiredForSourceOnlyAbiArg instance. |
PrebuiltJarDescriptionArg.Builder |
from(com.facebook.buck.jvm.java.PrebuiltJarDescription.AbstractPrebuiltJarDescriptionArg instance)
Copy abstract value type
AbstractPrebuiltJarDescriptionArg instance into builder. |
PrebuiltJarDescriptionArg.Builder |
from(PrebuiltJarDescriptionArg instance)
Fill a builder with attribute values from the provided
PrebuiltJarDescriptionArg instance. |
PrebuiltJarDescriptionArg.Builder |
setBinaryJar(SourcePath binaryJar)
Initializes the value for the
binaryJar attribute. |
PrebuiltJarDescriptionArg.Builder |
setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
Sets or replaces all elements for
compatibleWith list. |
PrebuiltJarDescriptionArg.Builder |
setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
PrebuiltJarDescriptionArg.Builder |
setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
Initializes the optional value
defaultTargetPlatform to defaultTargetPlatform. |
PrebuiltJarDescriptionArg.Builder |
setDeps(Iterable<? extends BuildTarget> elements)
Sets or replaces all elements for
deps sortedSet. |
PrebuiltJarDescriptionArg.Builder |
setGenerateAbi(boolean generateAbi)
Initializes the value for the
generateAbi attribute. |
PrebuiltJarDescriptionArg.Builder |
setGwtJar(Optional<? extends SourcePath> gwtJar)
Initializes the optional value
gwtJar to gwtJar. |
PrebuiltJarDescriptionArg.Builder |
setGwtJar(SourcePath gwtJar)
Initializes the optional value
gwtJar to gwtJar. |
PrebuiltJarDescriptionArg.Builder |
setJavadocUrl(Optional<String> javadocUrl)
Initializes the optional value
javadocUrl to javadocUrl. |
PrebuiltJarDescriptionArg.Builder |
setJavadocUrl(String javadocUrl)
Initializes the optional value
javadocUrl to javadocUrl. |
PrebuiltJarDescriptionArg.Builder |
setLabels(Iterable<String> elements)
Sets or replaces all elements for
labels sortedSet. |
PrebuiltJarDescriptionArg.Builder |
setLicenses(Iterable<? extends SourcePath> elements)
Sets or replaces all elements for
licenses set. |
PrebuiltJarDescriptionArg.Builder |
setMavenCoords(Optional<String> mavenCoords)
Initializes the optional value
mavenCoords to mavenCoords. |
PrebuiltJarDescriptionArg.Builder |
setMavenCoords(String mavenCoords)
Initializes the optional value
mavenCoords to mavenCoords. |
PrebuiltJarDescriptionArg.Builder |
setName(String name)
Initializes the value for the
name attribute. |
PrebuiltJarDescriptionArg.Builder |
setNeverMarkAsUnusedDependency(boolean neverMarkAsUnusedDependency)
Initializes the value for the
neverMarkAsUnusedDependency attribute. |
PrebuiltJarDescriptionArg.Builder |
setProvided(boolean provided)
Initializes the value for the
provided attribute. |
PrebuiltJarDescriptionArg.Builder |
setRequiredForSourceOnlyAbi(boolean requiredForSourceOnlyAbi)
Initializes the value for the
requiredForSourceOnlyAbi attribute. |
PrebuiltJarDescriptionArg.Builder |
setSourceJar(Optional<? extends SourcePath> sourceJar)
Initializes the optional value
sourceJar to sourceJar. |
PrebuiltJarDescriptionArg.Builder |
setSourceJar(SourcePath sourceJar)
Initializes the optional value
sourceJar to sourceJar. |
public final PrebuiltJarDescriptionArg.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 PrebuiltJarDescriptionArg.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 PrebuiltJarDescriptionArg.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 PrebuiltJarDescriptionArg.Builder from(PrebuiltJarDescriptionArg instance)
PrebuiltJarDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder from(com.facebook.buck.jvm.java.PrebuiltJarDescription.AbstractPrebuiltJarDescriptionArg instance)
AbstractPrebuiltJarDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder from(MaybeRequiredForSourceOnlyAbiArg instance)
com.facebook.buck.jvm.java.MaybeRequiredForSourceOnlyAbiArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setBinaryJar(SourcePath binaryJar)
binaryJar
attribute.binaryJar
- The value for binaryJarthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setSourceJar(SourcePath sourceJar)
sourceJar
to sourceJar.sourceJar
- The value for sourceJarthis
builder for chained invocationpublic final PrebuiltJarDescriptionArg.Builder setSourceJar(Optional<? extends SourcePath> sourceJar)
sourceJar
to sourceJar.sourceJar
- The value for sourceJarthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setGwtJar(SourcePath gwtJar)
gwtJar
to gwtJar.gwtJar
- The value for gwtJarthis
builder for chained invocationpublic final PrebuiltJarDescriptionArg.Builder setGwtJar(Optional<? extends SourcePath> gwtJar)
gwtJar
to gwtJar.gwtJar
- The value for gwtJarthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setJavadocUrl(String javadocUrl)
javadocUrl
to javadocUrl.javadocUrl
- The value for javadocUrlthis
builder for chained invocationpublic final PrebuiltJarDescriptionArg.Builder setJavadocUrl(Optional<String> javadocUrl)
javadocUrl
to javadocUrl.javadocUrl
- The value for javadocUrlthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setMavenCoords(String mavenCoords)
mavenCoords
to mavenCoords.mavenCoords
- The value for mavenCoordsthis
builder for chained invocationpublic final PrebuiltJarDescriptionArg.Builder setMavenCoords(Optional<String> mavenCoords)
mavenCoords
to mavenCoords.mavenCoords
- The value for mavenCoordsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setProvided(boolean provided)
provided
attribute.
If not set, this attribute will have a default value as returned by the initializer of provided
.
provided
- The value for providedthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setRequiredForSourceOnlyAbi(boolean requiredForSourceOnlyAbi)
requiredForSourceOnlyAbi
attribute.
If not set, this attribute will have a default value as returned by the initializer of requiredForSourceOnlyAbi
.
requiredForSourceOnlyAbi
- The value for requiredForSourceOnlyAbithis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setGenerateAbi(boolean generateAbi)
generateAbi
attribute.
If not set, this attribute will have a default value as returned by the initializer of generateAbi
.
generateAbi
- The value for generateAbithis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setNeverMarkAsUnusedDependency(boolean neverMarkAsUnusedDependency)
neverMarkAsUnusedDependency
attribute.
If not set, this attribute will have a default value as returned by the initializer of neverMarkAsUnusedDependency
.
neverMarkAsUnusedDependency
- The value for neverMarkAsUnusedDependencythis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final PrebuiltJarDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final PrebuiltJarDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic PrebuiltJarDescriptionArg build()
PrebuiltJarDescriptionArg
.IllegalStateException
- if any required attributes are missing