Class LoadAdditionalSourceTransformer
java.lang.Object
org.apache.torque.generator.source.transform.LoadAdditionalSourceTransformer
- All Implemented Interfaces:
SourceTransformer
A SourceTransformer which loads other sources into the current source graph.
- Version:
- $Id: LoadAdditionalSourceTransformer.java 1839288 2018-08-27 09:48:33Z tv $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the path to the source element to which the additional sources should be added.Returns the file patterns to exclude from the sources to read.Returns the file patterns to include to the sources to read.Returns the key of the format of the source file(s).voidsetElement(String element) Sets the path to the source element to which the additional sources should be added.voidsetFileExcludes(List<String> fileExcludes) Sets the file patterns to exclude from the sources to read.voidsetFileIncludes(List<String> fileIncludes) Sets the file patterns to include to the sources to read.voidsetSourceFormat(String sourceFormat) Sets the key of the source format of the source file(s).transform(Object rootObject, ControllerState controllerState) Loads the additional source into the current source graph.
-
Constructor Details
-
LoadAdditionalSourceTransformer
public LoadAdditionalSourceTransformer()
-
-
Method Details
-
transform
public SourceElement transform(Object rootObject, ControllerState controllerState) throws SourceTransformerException Loads the additional source into the current source graph.- Specified by:
transformin interfaceSourceTransformer- Parameters:
rootObject- the root of the source graph, not null.controllerState- the controller state, not null.- Returns:
- the transformed source root, not null.
- Throws:
SourceTransformerException- if the additional source cannot be loaded or the element to add to does not exist.
-
getElement
Returns the path to the source element to which the additional sources should be added.- Returns:
- the path to the anchor element.
-
setElement
Sets the path to the source element to which the additional sources should be added.- Parameters:
element- the path to the anchor element.
-
getFileIncludes
Returns the file patterns to include to the sources to read.- Returns:
- the file patterns to include.
-
setFileIncludes
Sets the file patterns to include to the sources to read.- Parameters:
fileIncludes- the file patterns to include.
-
getFileExcludes
Returns the file patterns to exclude from the sources to read.- Returns:
- the file patterns to exclude.
-
setFileExcludes
Sets the file patterns to exclude from the sources to read.- Parameters:
fileExcludes- the file patterns to exclude.
-
getSourceFormat
Returns the key of the format of the source file(s).- Returns:
- the key for the source format.
-
setSourceFormat
Sets the key of the source format of the source file(s).- Parameters:
sourceFormat- the key for the source format.
-