public class Macro extends Directive
BLOCK, LINE
Constructor and Description |
---|
Macro() |
Modifier and Type | Method and Description |
---|---|
static void |
checkArgs(RuntimeServices rs,
Token t,
Node node,
String sourceTemplate)
Used by Parser.java to do further parameter checking for macro arguments.
|
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.
|
boolean |
isScopeProvided()
Since this class does no processing of content,
there is never a need for an internal scope.
|
static StringBuffer |
macroToString(StringBuffer buf,
String[] argArray)
For debugging purposes.
|
boolean |
render(InternalContextAdapter context,
Writer writer,
Node node)
render() doesn't do anything in the final output rendering.
|
getColumn, getLine, getScopeName, getTemplateName, makeScope, postRender, preRender, setLocation, setLocation
public String getName()
public int getType()
public boolean isScopeProvided()
isScopeProvided
in class Directive
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException
render
in class Directive
context
- writer
- node
- IOException
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException
Directive
public static void checkArgs(RuntimeServices rs, Token t, Node node, String sourceTemplate) throws IOException, ParseException
IOException
ParseException
public static final StringBuffer macroToString(StringBuffer buf, String[] argArray)
argArray
and appends them to buf
.buf
- A StringBuffer. If null, a new StringBuffer is allocated.argArray
- The Macro arguments to formatCopyright © 2000–2021. All rights reserved.