|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.velocity.runtime.directive.Directive
org.apache.velocity.runtime.directive.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 | |
void |
checkArgs(InternalContextAdapter context,
Node node,
boolean hasBody)
check if we are calling this macro with the right number of arguments. |
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)
Initialize members of VelocimacroProxy. |
boolean |
render(InternalContextAdapter context,
Writer writer,
Node node)
How this directive is to be rendered |
boolean |
render(InternalContextAdapter context,
Writer writer,
Node node,
Renderable body)
Renders the macro using the context. |
void |
setArgArray(String[] arr)
sets the array of arguments specified in the macro definition |
void |
setName(String name)
sets the directive name of this VM |
void |
setNodeTree(SimpleNode tree)
|
| Methods inherited from class org.apache.velocity.runtime.directive.Directive |
getColumn, getLine, getScopeName, getTemplateName, init, isScopeProvided, makeScope, postRender, preRender, setLocation, 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 Directivepublic int getType()
getType in class Directivepublic void setName(String name)
name - public void setArgArray(String[] arr)
arr - public void setNodeTree(SimpleNode tree)
tree - public int getNumArgs()
public boolean render(InternalContextAdapter context,
Writer writer,
Node node)
throws IOException,
MethodInvocationException,
MacroOverflowException
Directive
render in class Directivecontext - writer - node -
IOException
MethodInvocationException
MacroOverflowException
public boolean render(InternalContextAdapter context,
Writer writer,
Node node,
Renderable body)
throws IOException,
MethodInvocationException,
MacroOverflowException
context - Current rendering contextwriter - Writer for outputnode - AST that calls the macro
IOException
MethodInvocationException
MacroOverflowExceptionpublic void init(RuntimeServices rs)
public void checkArgs(InternalContextAdapter context,
Node node,
boolean hasBody)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||