Package org.daisy.dotify.common.xml
Class TransformerEnvironment.Builder
- java.lang.Object
-
- org.daisy.dotify.common.xml.TransformerEnvironment.Builder
-
- Enclosing class:
- TransformerEnvironment<T extends Throwable>
public static class TransformerEnvironment.Builder extends Object
Provides a builder for aTransformerEnvironment
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransformerEnvironment<XMLToolsException>
build()
Builds a new environment using the current configuration of this builder.<Y extends Throwable>
TransformerEnvironment<Y>build(Function<? super Throwable,Y> throwableProcessor)
Builds a new environment with the specified type of throwable that can be thrown when using the environment.TransformerEnvironment.Builder
parameters(Map<String,Object> params)
Sets the xslt parameters for this environment.TransformerEnvironment.Builder
transformerFactory(TransformerFactory factory)
Sets the transformer factory for this environment.
-
-
-
Method Detail
-
transformerFactory
public TransformerEnvironment.Builder transformerFactory(TransformerFactory factory)
Sets the transformer factory for this environment.- Parameters:
factory
- the transformer factory- Returns:
- this builder
-
parameters
public TransformerEnvironment.Builder parameters(Map<String,Object> params)
Sets the xslt parameters for this environment.- Parameters:
params
- the xslt parameters- Returns:
- this builder
-
build
public TransformerEnvironment<XMLToolsException> build()
Builds a new environment using the current configuration of this builder.- Returns:
- a new
TransformerEnvironment
-
build
public <Y extends Throwable> TransformerEnvironment<Y> build(Function<? super Throwable,Y> throwableProcessor)
Builds a new environment with the specified type of throwable that can be thrown when using the environment.- Type Parameters:
Y
- the type of throwable to throw in case of an error- Parameters:
throwableProcessor
- a function that processes a throwable and returns another throwable- Returns:
- a new
TransformerEnvironment
-
-