|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.runtime.directive.Directive org.apache.velocity.runtime.directive.Macro
public class Macro
Macro.java Macro implements the macro definition directive of VTL. example : #macro( isnull $i ) #if( $i ) $i #end #end This object is used at parse time to mainly process and register the macro. It is used inline in the parser when processing a directive.
Field Summary |
---|
Fields inherited from class org.apache.velocity.runtime.directive.Directive |
---|
rsvc |
Fields inherited from interface org.apache.velocity.runtime.directive.DirectiveConstants |
---|
BLOCK, LINE |
Constructor Summary | |
---|---|
Macro()
|
Method Summary | |
---|---|
String |
getName()
Return name of this directive. |
int |
getType()
Return type of this directive. |
void |
init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
How this directive is to be initialized. |
static void |
processAndRegister(RuntimeServices rs,
Node node,
String sourceTemplate)
Used by Parser.java to process VMs withing the parsing process processAndRegister() doesn't actually render the macro to the output Processes the macro body into the internal representation used by the VelocimacroProxy objects, and if not currently used, adds it to the macro Factory |
boolean |
render(InternalContextAdapter context,
Writer writer,
Node node)
render() doesn't do anything in the final output rendering. |
Methods inherited from class org.apache.velocity.runtime.directive.Directive |
---|
getColumn, getLine, setLocation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Macro()
Method Detail |
---|
public String getName()
getName
in class Directive
public int getType()
getType
in class Directive
public boolean render(InternalContextAdapter context, Writer writer, Node node)
render
in class Directive
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws Exception
Directive
init
in class Directive
Exception
public static void processAndRegister(RuntimeServices rs, Node node, String sourceTemplate) throws ParseException
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |