Package com.io7m.xstructural.api
Class XSProcessorRequest.Builder
java.lang.Object
com.io7m.xstructural.api.XSProcessorRequest.Builder
- Enclosing class:
- XSProcessorRequest
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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newXSProcessorRequest.from(XSProcessorRequestType instance) Fill a builder with attribute values from the providedXSProcessorRequestTypeinstance.setBrandingFile(Path brandingFile) Initializes the optional valuebrandingFileto brandingFile.setBrandingFile(Optional<? extends Path> brandingFile) Initializes the optional valuebrandingFileto brandingFile.setMessageFile(Path messageFile) Initializes the value for themessageFileattribute.setOutputDirectory(Path outputDirectory) Initializes the value for theoutputDirectoryattribute.setOutputName(String outputName) Initializes the optional valueoutputNameto outputName.setOutputName(Optional<String> outputName) Initializes the optional valueoutputNameto outputName.setSourceFile(Path sourceFile) Initializes the value for thesourceFileattribute.setStylesheet(XSProcessorRequestType.Stylesheet stylesheet) Initializes the value for thestylesheetattribute.Initializes the value for thetaskattribute.setTraceFile(Path traceFile) Initializes the value for thetraceFileattribute.setWriteResources(boolean writeResources) Initializes the value for thewriteResourcesattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedXSProcessorRequestTypeinstance. 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:
thisbuilder for use in a chained invocation
-
setOutputDirectory
Initializes the value for theoutputDirectoryattribute.- Parameters:
outputDirectory- The value for outputDirectory- Returns:
thisbuilder for use in a chained invocation
-
setSourceFile
Initializes the value for thesourceFileattribute.- Parameters:
sourceFile- The value for sourceFile- Returns:
thisbuilder for use in a chained invocation
-
setTask
Initializes the value for thetaskattribute.If not set, this attribute will have a default value as returned by the initializer of
task.- Parameters:
task- The value for task- Returns:
thisbuilder for use in a chained invocation
-
setStylesheet
Initializes the value for thestylesheetattribute.If not set, this attribute will have a default value as returned by the initializer of
stylesheet.- Parameters:
stylesheet- The value for stylesheet- Returns:
thisbuilder for use in a chained invocation
-
setWriteResources
Initializes the value for thewriteResourcesattribute.If not set, this attribute will have a default value as returned by the initializer of
writeResources.- Parameters:
writeResources- The value for writeResources- Returns:
thisbuilder for use in a chained invocation
-
setTraceFile
Initializes the value for thetraceFileattribute.If not set, this attribute will have a default value as returned by the initializer of
traceFile.- Parameters:
traceFile- The value for traceFile- Returns:
thisbuilder for use in a chained invocation
-
setMessageFile
Initializes the value for themessageFileattribute.If not set, this attribute will have a default value as returned by the initializer of
messageFile.- Parameters:
messageFile- The value for messageFile- Returns:
thisbuilder for use in a chained invocation
-
setBrandingFile
Initializes the optional valuebrandingFileto brandingFile.- Parameters:
brandingFile- The value for brandingFile- Returns:
thisbuilder for chained invocation
-
setBrandingFile
Initializes the optional valuebrandingFileto brandingFile.- Parameters:
brandingFile- The value for brandingFile- Returns:
thisbuilder for use in a chained invocation
-
setOutputName
Initializes the optional valueoutputNameto outputName.- Parameters:
outputName- The value for outputName- Returns:
thisbuilder for chained invocation
-
setOutputName
Initializes the optional valueoutputNameto outputName.- Parameters:
outputName- The value for outputName- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newXSProcessorRequest.- Returns:
- An immutable instance of XSProcessorRequest
- Throws:
IllegalStateException- if any required attributes are missing
-