Class GoTestDescriptionArg.Builder

  • Enclosing class:
    GoTestDescriptionArg

    @NotThreadSafe
    public static final class GoTestDescriptionArg.Builder
    extends Object
    Builds instances of type GoTestDescriptionArg. 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.

    • Method Detail

      • from

        public final GoTestDescriptionArg.Builder from​(HasDeclaredDeps instance)
        Fill a builder with attribute values from the provided com.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 GoTestDescriptionArg.Builder from​(HasTestTimeout instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.description.arg.HasTestTimeout instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final GoTestDescriptionArg.Builder from​(GoTestDescriptionArg instance)
        Fill a builder with attribute values from the provided GoTestDescriptionArg instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final GoTestDescriptionArg.Builder from​(com.facebook.buck.features.go.GoTestDescription.AbstractGoTestDescriptionArg instance)
        Copy abstract value type AbstractGoTestDescriptionArg instance into builder.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final GoTestDescriptionArg.Builder from​(HasTestRunner instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.test.rule.HasTestRunner instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final GoTestDescriptionArg.Builder from​(BuildRuleArg instance)
        Fill a builder with attribute values from the provided com.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 GoTestDescriptionArg.Builder from​(HasGoLinkable instance)
        Fill a builder with attribute values from the provided com.facebook.buck.features.go.HasGoLinkable instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final GoTestDescriptionArg.Builder from​(HasContacts instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.description.arg.HasContacts instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final GoTestDescriptionArg.Builder from​(HasSrcs instance)
        Fill a builder with attribute values from the provided com.facebook.buck.core.description.arg.HasSrcs instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final GoTestDescriptionArg.Builder from​(ConstructorArg instance)
        Fill a builder with attribute values from the provided com.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
      • setLibrary

        public final GoTestDescriptionArg.Builder setLibrary​(BuildTarget library)
        Initializes the optional value library to library.
        Parameters:
        library - The value for library
        Returns:
        this builder for chained invocation
      • setPackageName

        public final GoTestDescriptionArg.Builder setPackageName​(String packageName)
        Initializes the optional value packageName to packageName.
        Parameters:
        packageName - The value for packageName
        Returns:
        this builder for chained invocation
      • setPackageName

        public final GoTestDescriptionArg.Builder setPackageName​(Optional<String> packageName)
        Initializes the optional value packageName to packageName.
        Parameters:
        packageName - The value for packageName
        Returns:
        this builder for use in a chained invocation
      • setCoverageMode

        public final GoTestDescriptionArg.Builder setCoverageMode​(com.facebook.buck.features.go.GoTestCoverStep.Mode coverageMode)
        Initializes the optional value coverageMode to coverageMode.
        Parameters:
        coverageMode - The value for coverageMode
        Returns:
        this builder for chained invocation
      • setCoverageMode

        public final GoTestDescriptionArg.Builder setCoverageMode​(Optional<? extends com.facebook.buck.features.go.GoTestCoverStep.Mode> coverageMode)
        Initializes the optional value coverageMode to coverageMode.
        Parameters:
        coverageMode - The value for coverageMode
        Returns:
        this builder for use in a chained invocation
      • putEnv

        public final GoTestDescriptionArg.Builder putEnv​(String key,
                                                         StringWithMacros value)
        Put one entry to the env map.
        Parameters:
        key - The key in the env map
        value - The associated value in the env map
        Returns:
        this builder for use in a chained invocation
      • setEnv

        public final GoTestDescriptionArg.Builder setEnv​(Map<String,​? extends StringWithMacros> entries)
        Sets or replaces all mappings from the specified map as entries for the env map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the env map
        Returns:
        this builder for use in a chained invocation
      • putAllEnv

        public final GoTestDescriptionArg.Builder putAllEnv​(Map<String,​? extends StringWithMacros> entries)
        Put all mappings from the specified map as entries to env map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the env map
        Returns:
        this builder for use in a chained invocation
      • setRunTestSeparately

        public final GoTestDescriptionArg.Builder setRunTestSeparately​(boolean runTestSeparately)
        Initializes the value for the runTestSeparately attribute.

        If not set, this attribute will have a default value as returned by the initializer of runTestSeparately.

        Parameters:
        runTestSeparately - The value for runTestSeparately
        Returns:
        this builder for use in a chained invocation
      • addLabels

        public final GoTestDescriptionArg.Builder addLabels​(String element)
        Adds one element to labels sortedSet.
        Parameters:
        element - A labels element
        Returns:
        this builder for use in a chained invocation
      • addLabels

        public final GoTestDescriptionArg.Builder addLabels​(String... elements)
        Adds elements to labels sortedSet.
        Parameters:
        elements - An array of labels elements
        Returns:
        this builder for use in a chained invocation
      • setLabels

        public final GoTestDescriptionArg.Builder setLabels​(Iterable<String> elements)
        Sets or replaces all elements for labels sortedSet.
        Parameters:
        elements - An iterable of labels elements
        Returns:
        this builder for use in a chained invocation
      • addAllLabels

        public final GoTestDescriptionArg.Builder addAllLabels​(Iterable<String> elements)
        Adds elements to labels sortedSet.
        Parameters:
        elements - An iterable of labels elements
        Returns:
        this builder for use in a chained invocation
      • addLicenses

        public final GoTestDescriptionArg.Builder addLicenses​(SourcePath... elements)
        Adds elements to licenses set.
        Parameters:
        elements - An array of licenses elements
        Returns:
        this builder for use in a chained invocation
      • setLicenses

        public final GoTestDescriptionArg.Builder setLicenses​(Iterable<? extends SourcePath> elements)
        Sets or replaces all elements for licenses set.
        Parameters:
        elements - An iterable of licenses elements
        Returns:
        this builder for use in a chained invocation
      • setName

        public final GoTestDescriptionArg.Builder setName​(String name)
        Initializes the value for the name attribute.
        Parameters:
        name - The value for name
        Returns:
        this builder for use in a chained invocation
      • addContacts

        public final GoTestDescriptionArg.Builder addContacts​(String element)
        Adds one element to contacts sortedSet.
        Parameters:
        element - A contacts element
        Returns:
        this builder for use in a chained invocation
      • addContacts

        public final GoTestDescriptionArg.Builder addContacts​(String... elements)
        Adds elements to contacts sortedSet.
        Parameters:
        elements - An array of contacts elements
        Returns:
        this builder for use in a chained invocation
      • setContacts

        public final GoTestDescriptionArg.Builder setContacts​(Iterable<String> elements)
        Sets or replaces all elements for contacts sortedSet.
        Parameters:
        elements - An iterable of contacts elements
        Returns:
        this builder for use in a chained invocation
      • addAllContacts

        public final GoTestDescriptionArg.Builder addAllContacts​(Iterable<String> elements)
        Adds elements to contacts sortedSet.
        Parameters:
        elements - An iterable of contacts elements
        Returns:
        this builder for use in a chained invocation
      • addDeps

        public final GoTestDescriptionArg.Builder addDeps​(BuildTarget... elements)
        Adds elements to deps sortedSet.
        Parameters:
        elements - An array of deps elements
        Returns:
        this builder for use in a chained invocation
      • setDeps

        public final GoTestDescriptionArg.Builder setDeps​(Iterable<? extends BuildTarget> elements)
        Sets or replaces all elements for deps sortedSet.
        Parameters:
        elements - An iterable of deps elements
        Returns:
        this builder for use in a chained invocation
      • addSrcs

        public final GoTestDescriptionArg.Builder addSrcs​(SourcePath element)
        Adds one element to srcs sortedSet.
        Parameters:
        element - A srcs element
        Returns:
        this builder for use in a chained invocation
      • addSrcs

        public final GoTestDescriptionArg.Builder addSrcs​(SourcePath... elements)
        Adds elements to srcs sortedSet.
        Parameters:
        elements - An array of srcs elements
        Returns:
        this builder for use in a chained invocation
      • setSrcs

        public final GoTestDescriptionArg.Builder setSrcs​(Iterable<? extends SourcePath> elements)
        Sets or replaces all elements for srcs sortedSet.
        Parameters:
        elements - An iterable of srcs elements
        Returns:
        this builder for use in a chained invocation
      • addAllSrcs

        public final GoTestDescriptionArg.Builder addAllSrcs​(Iterable<? extends SourcePath> elements)
        Adds elements to srcs sortedSet.
        Parameters:
        elements - An iterable of srcs elements
        Returns:
        this builder for use in a chained invocation
      • setRunner

        public final GoTestDescriptionArg.Builder setRunner​(BuildTarget runner)
        Initializes the optional value runner to runner.
        Parameters:
        runner - The value for runner
        Returns:
        this builder for chained invocation
      • setTestRuleTimeoutMs

        public final GoTestDescriptionArg.Builder setTestRuleTimeoutMs​(long testRuleTimeoutMs)
        Initializes the optional value testRuleTimeoutMs to testRuleTimeoutMs.
        Parameters:
        testRuleTimeoutMs - The value for testRuleTimeoutMs
        Returns:
        this builder for chained invocation
      • setTestRuleTimeoutMs

        public final GoTestDescriptionArg.Builder setTestRuleTimeoutMs​(Optional<Long> testRuleTimeoutMs)
        Initializes the optional value testRuleTimeoutMs to testRuleTimeoutMs.
        Parameters:
        testRuleTimeoutMs - The value for testRuleTimeoutMs
        Returns:
        this builder for use in a chained invocation
      • setPlatform

        public final GoTestDescriptionArg.Builder setPlatform​(Flavor platform)
        Initializes the optional value platform to platform.
        Parameters:
        platform - The value for platform
        Returns:
        this builder for chained invocation
      • setPlatform

        public final GoTestDescriptionArg.Builder setPlatform​(Optional<? extends Flavor> platform)
        Initializes the optional value platform to platform.
        Parameters:
        platform - The value for platform
        Returns:
        this builder for use in a chained invocation
      • setLinkMode

        public final GoTestDescriptionArg.Builder setLinkMode​(com.facebook.buck.features.go.GoLinkStep.LinkMode linkMode)
        Initializes the optional value linkMode to linkMode.
        Parameters:
        linkMode - The value for linkMode
        Returns:
        this builder for chained invocation
      • setLinkMode

        public final GoTestDescriptionArg.Builder setLinkMode​(Optional<? extends com.facebook.buck.features.go.GoLinkStep.LinkMode> linkMode)
        Initializes the optional value linkMode to linkMode.
        Parameters:
        linkMode - The value for linkMode
        Returns:
        this builder for use in a chained invocation
      • addCompilerFlags

        public final GoTestDescriptionArg.Builder addCompilerFlags​(String element)
        Adds one element to compilerFlags list.
        Parameters:
        element - A compilerFlags element
        Returns:
        this builder for use in a chained invocation
      • addCompilerFlags

        public final GoTestDescriptionArg.Builder addCompilerFlags​(String... elements)
        Adds elements to compilerFlags list.
        Parameters:
        elements - An array of compilerFlags elements
        Returns:
        this builder for use in a chained invocation
      • setCompilerFlags

        public final GoTestDescriptionArg.Builder setCompilerFlags​(Iterable<String> elements)
        Sets or replaces all elements for compilerFlags list.
        Parameters:
        elements - An iterable of compilerFlags elements
        Returns:
        this builder for use in a chained invocation
      • addAssemblerFlags

        public final GoTestDescriptionArg.Builder addAssemblerFlags​(String element)
        Adds one element to assemblerFlags list.
        Parameters:
        element - A assemblerFlags element
        Returns:
        this builder for use in a chained invocation
      • addAssemblerFlags

        public final GoTestDescriptionArg.Builder addAssemblerFlags​(String... elements)
        Adds elements to assemblerFlags list.
        Parameters:
        elements - An array of assemblerFlags elements
        Returns:
        this builder for use in a chained invocation
      • setAssemblerFlags

        public final GoTestDescriptionArg.Builder setAssemblerFlags​(Iterable<String> elements)
        Sets or replaces all elements for assemblerFlags list.
        Parameters:
        elements - An iterable of assemblerFlags elements
        Returns:
        this builder for use in a chained invocation
      • addLinkerFlags

        public final GoTestDescriptionArg.Builder addLinkerFlags​(String element)
        Adds one element to linkerFlags list.
        Parameters:
        element - A linkerFlags element
        Returns:
        this builder for use in a chained invocation
      • addLinkerFlags

        public final GoTestDescriptionArg.Builder addLinkerFlags​(String... elements)
        Adds elements to linkerFlags list.
        Parameters:
        elements - An array of linkerFlags elements
        Returns:
        this builder for use in a chained invocation
      • setLinkerFlags

        public final GoTestDescriptionArg.Builder setLinkerFlags​(Iterable<String> elements)
        Sets or replaces all elements for linkerFlags list.
        Parameters:
        elements - An iterable of linkerFlags elements
        Returns:
        this builder for use in a chained invocation
      • addExternalLinkerFlags

        public final GoTestDescriptionArg.Builder addExternalLinkerFlags​(String... elements)
        Adds elements to externalLinkerFlags list.
        Parameters:
        elements - An array of externalLinkerFlags elements
        Returns:
        this builder for use in a chained invocation
      • addResources

        public final GoTestDescriptionArg.Builder addResources​(SourcePath... elements)
        Adds elements to resources sortedSet.
        Parameters:
        elements - An array of resources elements
        Returns:
        this builder for use in a chained invocation
      • setResources

        public final GoTestDescriptionArg.Builder setResources​(Iterable<? extends SourcePath> elements)
        Sets or replaces all elements for resources sortedSet.
        Parameters:
        elements - An iterable of resources elements
        Returns:
        this builder for use in a chained invocation