|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Transformation
Interface for all transformations. Before the transformation is executed, one or multiple file pairs (input and output file) are specified. Optionally, an user can specify some parameters. Main transformation's logic is executed after calling execute(). The framework doesn't know how or if the files are transformed and written to destination files. It only provides convinient interface, which should fit to any general transformation on set of files. The transformation itself can therefore contain many phases (analysis, some computations) before destination files are generated. The only problem with interface is, that it can't specify constructor. Each transformation should have constructor without any parameters, otherwise it won't be instanciated by framework. Programmers can use ANTLR in their transformations, but this is not forced.
Method Summary | |
---|---|
void |
addMappedFile(MappedFile mappedFile)
Adds one mapped fileswhich should be transformed |
void |
clearParams()
Clears all parameters |
void |
execute()
Executes main logic of transformation |
java.util.List<MappedFile> |
getMappedFiles()
Returns list of mapped files, which should be transformed |
java.lang.Object |
getParam(java.lang.String name)
Gets one single parameter |
java.lang.Object |
getParam(java.lang.String name,
java.lang.Object defaultValue)
Gets one single parameter |
java.util.Map<java.lang.String,java.lang.Object> |
getParams()
Returns map of parameters, which were passed to transformation |
void |
setMappedFiles(java.util.List<MappedFile> mappedFiles)
Sets list of mapped files, which should be transformed |
void |
setParam(java.lang.String name,
java.lang.Object value)
Sets one single parameter |
void |
setParams(java.util.Map<java.lang.String,java.lang.Object> params)
Sets set of parameters |
Method Detail |
---|
java.util.List<MappedFile> getMappedFiles()
void setMappedFiles(java.util.List<MappedFile> mappedFiles)
mappedFiles
- mapped filesvoid addMappedFile(MappedFile mappedFile)
mappedFile
- mapped filejava.util.Map<java.lang.String,java.lang.Object> getParams()
void setParams(java.util.Map<java.lang.String,java.lang.Object> params)
params
- set of parametersvoid setParam(java.lang.String name, java.lang.Object value)
name
- name of parametervalue
- value of parameterjava.lang.Object getParam(java.lang.String name)
name
- name of parameter
java.lang.Object getParam(java.lang.String name, java.lang.Object defaultValue)
name
- name of parameterdefaultValue
- default value
void clearParams()
void execute() throws TransformationException
TransformationException
- if transformation has failed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |