@NotThreadSafe public static final class OcamlBinaryDescriptionArg.Builder extends Object
OcamlBinaryDescriptionArg
.
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 OcamlBinaryDescriptionArg.Builder from(OcamlBinaryDescriptionArg instance)
OcamlBinaryDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder from(com.facebook.buck.features.ocaml.OcamlBinaryDescription.AbstractOcamlBinaryDescriptionArg instance)
AbstractOcamlBinaryDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.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 OcamlBinaryDescriptionArg.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 OcamlBinaryDescriptionArg.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 OcamlBinaryDescriptionArg.Builder setSrcs(SourceSet srcs)
srcs
to srcs.srcs
- The value for srcsthis
builder for chained invocationpublic final OcamlBinaryDescriptionArg.Builder setSrcs(Optional<? extends SourceSet> srcs)
srcs
to srcs.srcs
- The value for srcsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addCompilerFlags(StringWithMacros element)
compilerFlags
list.element
- A compilerFlags elementthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addCompilerFlags(StringWithMacros... elements)
compilerFlags
list.elements
- An array of compilerFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setCompilerFlags(Iterable<? extends StringWithMacros> elements)
compilerFlags
list.elements
- An iterable of compilerFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addAllCompilerFlags(Iterable<? extends StringWithMacros> elements)
compilerFlags
list.elements
- An iterable of compilerFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addLinkerFlags(String element)
linkerFlags
list.element
- A linkerFlags elementthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addLinkerFlags(String... elements)
linkerFlags
list.elements
- An array of linkerFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setLinkerFlags(Iterable<String> elements)
linkerFlags
list.elements
- An iterable of linkerFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addAllLinkerFlags(Iterable<String> elements)
linkerFlags
list.elements
- An iterable of linkerFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addOcamldepFlags(String element)
ocamldepFlags
list.element
- A ocamldepFlags elementthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addOcamldepFlags(String... elements)
ocamldepFlags
list.elements
- An array of ocamldepFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setOcamldepFlags(Iterable<String> elements)
ocamldepFlags
list.elements
- An iterable of ocamldepFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addAllOcamldepFlags(Iterable<String> elements)
ocamldepFlags
list.elements
- An iterable of ocamldepFlags elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setWarningsFlags(String warningsFlags)
warningsFlags
to warningsFlags.warningsFlags
- The value for warningsFlagsthis
builder for chained invocationpublic final OcamlBinaryDescriptionArg.Builder setWarningsFlags(Optional<String> warningsFlags)
warningsFlags
to warningsFlags.warningsFlags
- The value for warningsFlagsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setBytecodeOnly(boolean bytecodeOnly)
bytecodeOnly
to bytecodeOnly.bytecodeOnly
- The value for bytecodeOnlythis
builder for chained invocationpublic final OcamlBinaryDescriptionArg.Builder setBytecodeOnly(Optional<Boolean> bytecodeOnly)
bytecodeOnly
to bytecodeOnly.bytecodeOnly
- The value for bytecodeOnlythis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setPlatform(Flavor platform)
platform
to platform.platform
- The value for platformthis
builder for chained invocationpublic final OcamlBinaryDescriptionArg.Builder setPlatform(Optional<? extends Flavor> platform)
platform
to platform.platform
- The value for platformthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.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 OcamlBinaryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final OcamlBinaryDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final OcamlBinaryDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic OcamlBinaryDescriptionArg build()
OcamlBinaryDescriptionArg
.IllegalStateException
- if any required attributes are missing