|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object ee.mare.indrek.jtlt.macros.MacroAdapter
Adapter class for easy macro creation. By default it is set to parsetime, non-recursive and will return an empty string, name is specified by the constructor.
Constructor Summary | |
MacroAdapter(String name)
Construct a simple macro with given name. |
Method Summary | |
String |
getName()
Get the name of the macro. |
boolean |
isParsetime()
Returns whether a macro is parsetime or not. |
boolean |
isRecursive()
Whether to recursively parse the output of this the macro. |
String |
process(TemplateParams ctx,
String name,
String args)
This method is called with given block context whenever a macro with registered name is found inside the tempalate. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MacroAdapter(String name)
Method Detail |
public String getName()
TemplateMacro
getName
in interface TemplateMacro
public boolean isParsetime()
TemplateMacro
isParsetime
in interface TemplateMacro
public boolean isRecursive()
TemplateMacro
isRecursive
in interface TemplateMacro
public String process(TemplateParams ctx, String name, String args)
TemplateMacro
process
in interface TemplateMacro
TemplateParams.findParam(java.lang.String, boolean)
,
Template.addParam(java.lang.String, java.lang.Object)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |