|
||||||||||
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.VelocimacroProxy
public class VelocimacroProxy
VelocimacroProxy.java a proxy Directive-derived object to fit with the current directive system
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 | |
---|---|
VelocimacroProxy()
|
Method Summary | |
---|---|
String |
getName()
Return name of this Velocimacro. |
int |
getNumArgs()
returns the number of ars needed for this VM |
int |
getType()
Velocimacros are always LINE type directives. |
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. |
boolean |
render(InternalContextAdapter context,
Writer writer,
Node node)
Renders the macro using the context |
void |
setArgArray(String[] arr)
sets the array of arguments specified in the macro definition |
void |
setMacrobody(String mb)
Sets the orignal macro body. |
void |
setName(String name)
sets the directive name of this VM |
void |
setNamespace(String ns)
|
void |
setNodeTree(SimpleNode tree)
|
boolean |
setupMacro(String[] callArgs,
int[] callArgTypes)
basic VM setup. |
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 VelocimacroProxy()
Method Detail |
---|
public String getName()
getName
in class Directive
public int getType()
getType
in class Directive
public void setName(String name)
name
- public void setArgArray(String[] arr)
arr
- public void setNodeTree(SimpleNode tree)
tree
- public int getNumArgs()
public void setMacrobody(String mb)
mb
- public void setNamespace(String ns)
ns
- public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, MethodInvocationException
render
in class Directive
context
- writer
- node
-
IOException
MethodInvocationException
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException
init
in class Directive
rs
- context
- node
-
TemplateInitException
public boolean setupMacro(String[] callArgs, int[] callArgTypes)
callArgs
- callArgTypes
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |