public class FreeMarkerTransformer extends java.lang.Object implements Transformer
Transformer that transforms XML files by applying FreeMarker templates.| Constructor and Description |
|---|
FreeMarkerTransformer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
configure(java.io.File pConfigurationFile)
Configure this transformer with the values in a configuration file.
|
int |
executeTransformations(java.util.function.BiFunction<java.io.File,java.io.File,OutputFileSpec> pOutputFileMapping)
Apply all successfully loaded template files to all successfully loaded source files.
|
int |
loadSources(org.gradle.api.file.FileCollection pSourceFiles)
Load the source files to transform in the next call to
Transformer.executeTransformations(BiFunction). |
int |
loadTemplates(org.gradle.api.file.FileCollection pTemplateFiles)
Load the template files to transform source files with in the next call to
Transformer.executeTransformations(BiFunction). |
void |
setOutputFileCharset(java.nio.charset.Charset pCharset)
Set the character set to encode the output files with.
|
void |
setTransformationParameters(java.util.Map<java.lang.String,java.lang.Object> pParameters)
Set the parameters to be used in all transformations.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlogTransformationpublic boolean configure(java.io.File pConfigurationFile)
Transformerconfigure in interface TransformerpConfigurationFile - The configuration file. If this parameter is null, a default
configuration will be used.public void setTransformationParameters(java.util.Map<java.lang.String,java.lang.Object> pParameters)
TransformersetTransformationParameters in interface TransformerpParameters - The transformation parameters.public void setOutputFileCharset(java.nio.charset.Charset pCharset)
TransformerNote that all implementations may not honor this setting.
setOutputFileCharset in interface TransformerpCharset - The output file character set.public int loadSources(org.gradle.api.file.FileCollection pSourceFiles)
TransformerTransformer.executeTransformations(BiFunction).loadSources in interface TransformerpSourceFiles - The source files to load.public int loadTemplates(org.gradle.api.file.FileCollection pTemplateFiles)
TransformerTransformer.executeTransformations(BiFunction).loadTemplates in interface TransformerpTemplateFiles - The template files to load.public int executeTransformations(java.util.function.BiFunction<java.io.File,java.io.File,OutputFileSpec> pOutputFileMapping)
TransformerexecuteTransformations in interface TransformerpOutputFileMapping - A function that returns the output file for a source/template
file combination.