public class Macro extends Directive
BLOCK, LINE| 构造器和说明 |
|---|
Macro() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
checkArgs(RuntimeServices rs,
Token t,
Node node,
java.lang.String sourceTemplate)
Used by Parser.java to do further parameter checking for macro arguments.
|
java.lang.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 java.lang.StringBuilder |
macroToString(java.lang.StringBuilder buf,
java.lang.String[] argArray)
For debugging purposes.
|
boolean |
render(InternalContextAdapter context,
java.io.Writer writer,
Node node)
render() doesn't do anything in the final output rendering.
|
getColumn, getLine, getScopeName, getTemplateName, makeScope, postRender, preRender, setLocation, setLocationpublic java.lang.String getName()
public int getType()
public boolean isScopeProvided()
isScopeProvided 在类中 Directivepublic boolean render(InternalContextAdapter context, java.io.Writer writer, Node node) throws java.io.IOException
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException
Directivepublic static void checkArgs(RuntimeServices rs, Token t, Node node, java.lang.String sourceTemplate) throws java.io.IOException, ParseException
java.io.IOExceptionParseExceptionpublic static final java.lang.StringBuilder macroToString(java.lang.StringBuilder buf,
java.lang.String[] argArray)
argArray and appends them to buf.buf - A StringBuffer. If null, a new StringBuilder is allocated.argArray - The Macro arguments to format