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.setTypeDescriptionFile(Path typeDescriptionFile) Initializes the optional valuetypeDescriptionFileto typeDescriptionFile.setTypeDescriptionFile(Optional<? extends Path> typeDescriptionFile) Initializes the optional valuetypeDescriptionFileto typeDescriptionFile.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
-
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
-
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
-
setTypeDescriptionFile
Initializes the optional valuetypeDescriptionFileto typeDescriptionFile.- Parameters:
typeDescriptionFile- The value for typeDescriptionFile- Returns:
thisbuilder for chained invocation
-
setTypeDescriptionFile
public final XSProcessorRequest.Builder setTypeDescriptionFile(Optional<? extends Path> typeDescriptionFile) Initializes the optional valuetypeDescriptionFileto typeDescriptionFile.- Parameters:
typeDescriptionFile- The value for typeDescriptionFile- 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
-