Class XSProcessorRequest.Builder

java.lang.Object
com.io7m.xstructural.api.XSProcessorRequest.Builder
Enclosing class:
XSProcessorRequest

public static final class XSProcessorRequest.Builder
extends java.lang.Object
Builds instances of type XSProcessorRequest. 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 Details

    • from

      public final XSProcessorRequest.Builder from​(XSProcessorRequestType instance)
      Fill a builder with attribute values from the provided XSProcessorRequestType instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setOutputDirectory

      public final XSProcessorRequest.Builder setOutputDirectory​(java.nio.file.Path outputDirectory)
      Initializes the value for the outputDirectory attribute.
      Parameters:
      outputDirectory - The value for outputDirectory
      Returns:
      this builder for use in a chained invocation
    • setSourceFile

      public final XSProcessorRequest.Builder setSourceFile​(java.nio.file.Path sourceFile)
      Initializes the value for the sourceFile attribute.
      Parameters:
      sourceFile - The value for sourceFile
      Returns:
      this builder for use in a chained invocation
    • setTask

      Initializes the value for the task attribute.

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

      Parameters:
      task - The value for task
      Returns:
      this builder for use in a chained invocation
    • setStylesheet

      public final XSProcessorRequest.Builder setStylesheet​(XSProcessorRequestType.Stylesheet stylesheet)
      Initializes the value for the stylesheet attribute.

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

      Parameters:
      stylesheet - The value for stylesheet
      Returns:
      this builder for use in a chained invocation
    • setWriteResources

      public final XSProcessorRequest.Builder setWriteResources​(boolean writeResources)
      Initializes the value for the writeResources attribute.

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

      Parameters:
      writeResources - The value for writeResources
      Returns:
      this builder for use in a chained invocation
    • setTraceFile

      public final XSProcessorRequest.Builder setTraceFile​(java.nio.file.Path traceFile)
      Initializes the value for the traceFile attribute.

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

      Parameters:
      traceFile - The value for traceFile
      Returns:
      this builder for use in a chained invocation
    • setMessageFile

      public final XSProcessorRequest.Builder setMessageFile​(java.nio.file.Path messageFile)
      Initializes the value for the messageFile attribute.

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

      Parameters:
      messageFile - The value for messageFile
      Returns:
      this builder for use in a chained invocation
    • setBrandingFile

      public final XSProcessorRequest.Builder setBrandingFile​(java.nio.file.Path brandingFile)
      Initializes the optional value brandingFile to brandingFile.
      Parameters:
      brandingFile - The value for brandingFile
      Returns:
      this builder for chained invocation
    • setBrandingFile

      public final XSProcessorRequest.Builder setBrandingFile​(java.util.Optional<? extends java.nio.file.Path> brandingFile)
      Initializes the optional value brandingFile to brandingFile.
      Parameters:
      brandingFile - The value for brandingFile
      Returns:
      this builder for use in a chained invocation
    • build

      public XSProcessorRequest build()
      Builds a new XSProcessorRequest.
      Returns:
      An immutable instance of XSProcessorRequest
      Throws:
      java.lang.IllegalStateException - if any required attributes are missing