|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IMTLEngine
Base interface for all implementation of an MTL evaluation engine.
| Method Summary | |
|---|---|
void |
addListener(MTLTextGenerationListener listener)
Registers a listener to be notified for any text generation that will take place in this engine evaluation process. |
java.util.Map<java.lang.String,java.io.StringWriter> |
evaluate(Template template,
java.util.List<? extends java.lang.Object> arguments,
java.io.File generationRoot,
boolean preview)
Evaluates the given MTL Template with the given arguments. |
void |
removeListener(MTLTextGenerationListener listener)
Removes a listener from the notification loops. |
| Method Detail |
|---|
void addListener(MTLTextGenerationListener listener)
listener - The new listener that is to be registered for notification.
java.util.Map<java.lang.String,java.io.StringWriter> evaluate(Template template,
java.util.List<? extends java.lang.Object> arguments,
java.io.File generationRoot,
boolean preview)
generationRoot will be used as the root of all generated files. For example, a template such as
[template generate(c:EClass)] [file(log.log, true)]processing class [c.name/][/file] [/template]evaluated with file:\\c:\ as generationRoot would create the file c:\log.log and generate a line "processing class <className>" for the argument.
template - The MTL template which is to be evaluated.arguments - List of the template's arguments.generationRoot - This will be used as the root for the generated files.preview - If true, no files will be generated and a Map mapping file pathes to their
generated content will be returned.
preview is set to true, no files will be generated. Instead, a Map
mapping all file pathes to the potential content will be returned. This returned map will be
empty otherwise.void removeListener(MTLTextGenerationListener listener)
listener - The listener that is to be removed from this engine's notification loops.
|
Copyright 2008 Obeo All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||