@NotThreadSafe public static final class GoLibraryDescriptionArg.Builder extends Object
GoLibraryDescriptionArg
.
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 GoLibraryDescriptionArg.Builder from(GoLibraryDescriptionArg instance)
GoLibraryDescriptionArg
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder from(com.facebook.buck.features.go.GoLibraryDescription.AbstractGoLibraryDescriptionArg instance)
AbstractGoLibraryDescriptionArg
instance into builder.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.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 GoLibraryDescriptionArg.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 GoLibraryDescriptionArg.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 GoLibraryDescriptionArg.Builder from(HasSrcs instance)
com.facebook.buck.core.description.arg.HasSrcs
instance.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.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 GoLibraryDescriptionArg.Builder addCompilerFlags(String element)
compilerFlags
list.element
- A compilerFlags elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addCompilerFlags(String... elements)
compilerFlags
list.elements
- An array of compilerFlags elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setCompilerFlags(Iterable<String> elements)
compilerFlags
list.elements
- An iterable of compilerFlags elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllCompilerFlags(Iterable<String> elements)
compilerFlags
list.elements
- An iterable of compilerFlags elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAssemblerFlags(String element)
assemblerFlags
list.element
- A assemblerFlags elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAssemblerFlags(String... elements)
assemblerFlags
list.elements
- An array of assemblerFlags elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setAssemblerFlags(Iterable<String> elements)
assemblerFlags
list.elements
- An iterable of assemblerFlags elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllAssemblerFlags(Iterable<String> elements)
assemblerFlags
list.elements
- An iterable of assemblerFlags elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setPackageName(String packageName)
packageName
to packageName.packageName
- The value for packageNamethis
builder for chained invocationpublic final GoLibraryDescriptionArg.Builder setPackageName(Optional<String> packageName)
packageName
to packageName.packageName
- The value for packageNamethis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addExportedDeps(BuildTarget element)
exportedDeps
sortedSet.element
- A exportedDeps elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addExportedDeps(BuildTarget... elements)
exportedDeps
sortedSet.elements
- An array of exportedDeps elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setExportedDeps(Iterable<? extends BuildTarget> elements)
exportedDeps
sortedSet.elements
- An iterable of exportedDeps elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllExportedDeps(Iterable<? extends BuildTarget> elements)
exportedDeps
sortedSet.elements
- An iterable of exportedDeps elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget element)
compatibleWith
list.element
- A compatibleWith elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addCompatibleWith(UnconfiguredBuildTarget... elements)
compatibleWith
list.elements
- An array of compatibleWith elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllCompatibleWith(Iterable<? extends UnconfiguredBuildTarget> elements)
compatibleWith
list.elements
- An iterable of compatibleWith elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setDefaultTargetPlatform(UnconfiguredBuildTarget defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for chained invocationpublic final GoLibraryDescriptionArg.Builder setDefaultTargetPlatform(Optional<? extends UnconfiguredBuildTarget> defaultTargetPlatform)
defaultTargetPlatform
to defaultTargetPlatform.defaultTargetPlatform
- The value for defaultTargetPlatformthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addLabels(String element)
labels
sortedSet.element
- A labels elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addLabels(String... elements)
labels
sortedSet.elements
- An array of labels elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllLabels(Iterable<String> elements)
labels
sortedSet.elements
- An iterable of labels elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addLicenses(SourcePath element)
licenses
set.element
- A licenses elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addLicenses(SourcePath... elements)
licenses
set.elements
- An array of licenses elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllLicenses(Iterable<? extends SourcePath> elements)
licenses
set.elements
- An iterable of licenses elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setName(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addDeps(BuildTarget element)
deps
sortedSet.element
- A deps elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addDeps(BuildTarget... elements)
deps
sortedSet.elements
- An array of deps elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllDeps(Iterable<? extends BuildTarget> elements)
deps
sortedSet.elements
- An iterable of deps elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addSrcs(SourcePath element)
srcs
sortedSet.element
- A srcs elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addSrcs(SourcePath... elements)
srcs
sortedSet.elements
- An array of srcs elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setSrcs(Iterable<? extends SourcePath> elements)
srcs
sortedSet.elements
- An iterable of srcs elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllSrcs(Iterable<? extends SourcePath> elements)
srcs
sortedSet.elements
- An iterable of srcs elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addTests(BuildTarget element)
tests
sortedSet.element
- A tests elementthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addTests(BuildTarget... elements)
tests
sortedSet.elements
- An array of tests elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder setTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic final GoLibraryDescriptionArg.Builder addAllTests(Iterable<? extends BuildTarget> elements)
tests
sortedSet.elements
- An iterable of tests elementsthis
builder for use in a chained invocationpublic GoLibraryDescriptionArg build()
GoLibraryDescriptionArg
.IllegalStateException
- if any required attributes are missing