| java.lang.Object org.apache.velocity.runtime.directive.Directive org.apache.velocity.runtime.directive.VelocimacroProxy
VelocimacroProxy | public class VelocimacroProxy extends Directive (Code) | | VelocimacroProxy.java
a proxy Directive-derived object to fit with the current directive system
author: Geir Magnusson Jr. version: $Id: VelocimacroProxy.java 471381 2006-11-05 08:56:58Z wglass $ |
Method Summary | |
public String | getName() Return name of this Velocimacro. | public int | getNumArgs() | public int | getType() Velocimacros are always LINE
type directives. | public void | init(RuntimeServices rs, InternalContextAdapter context, Node node) The major meat of VelocimacroProxy, init() checks the # of arguments, patches the
macro body, renders the macro into an AST, and then inits the AST, so it is ready
for quick rendering. | public boolean | render(InternalContextAdapter context, Writer writer, Node node) | public void | setArgArray(String[] arr) | public void | setMacrobody(String mb) Sets the orignal macro body. | public void | setName(String name) | public void | setNamespace(String ns) | public void | setNodeTree(SimpleNode tree) | public boolean | setupMacro(String[] callArgs, int[] callArgTypes) basic VM setup. |
getName | public String getName()(Code) | | Return name of this Velocimacro.
The name of this Velocimacro. |
getNumArgs | public int getNumArgs()(Code) | | returns the number of ars needed for this VM
The number of ars needed for this VM |
getType | public int getType()(Code) | | Velocimacros are always LINE
type directives.
The type of this directive. |
init | public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException(Code) | | The major meat of VelocimacroProxy, init() checks the # of arguments, patches the
macro body, renders the macro into an AST, and then inits the AST, so it is ready
for quick rendering. Note that this is only AST dependant stuff. Not context.
Parameters: rs - Parameters: context - Parameters: node - throws: TemplateInitException - |
setArgArray | public void setArgArray(String[] arr)(Code) | | sets the array of arguments specified in the macro definition
Parameters: arr - |
setMacrobody | public void setMacrobody(String mb)(Code) | | Sets the orignal macro body. This is simply the cat of the macroArray, but the
Macro object creates this once during parsing, and everyone shares it.
Note : it must not be modified.
Parameters: mb - |
setName | public void setName(String name)(Code) | | sets the directive name of this VM
Parameters: name - |
setNamespace | public void setNamespace(String ns)(Code) | | Parameters: ns - |
setupMacro | public boolean setupMacro(String[] callArgs, int[] callArgTypes)(Code) | | basic VM setup. Sets up the proxy args for this
use, and parses the tree
Parameters: callArgs - Parameters: callArgTypes - True if the proxy was setup successfully. |
|
|