public class Define extends Block
Block.ReferenceBLOCK, LINE| Constructor and Description |
|---|
Define() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkArgs(ArrayList<Integer> argtypes,
Token t,
String templateName)
Called by the parser to validate the argument types
|
String |
getName()
Return name of this directive.
|
void |
init(RuntimeServices rs,
InternalContextAdapter context,
Node node)
simple init - get the key
|
boolean |
render(InternalContextAdapter context,
Writer writer,
Node node)
directive.render() simply makes an instance of the Block inner class
and places it into the context as indicated.
|
getColumn, getLine, getScopeName, getTemplate, getTemplateName, isScopeProvided, makeScope, postRender, preRender, setLocation, setLocationpublic String getName()
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException
init in class BlockTemplateInitExceptionpublic boolean render(InternalContextAdapter context, Writer writer, Node node)
public void checkArgs(ArrayList<Integer> argtypes, Token t, String templateName) throws ParseException
checkArgs in class Directiveargtypes - type, Array of argument types of each argument to the directive
for example ParserTreeConstants.JJTWORDt - token of directivetemplateName - the name of the template this directive is referenced in.ParseExceptionCopyright © 2000–2021 The Apache Software Foundation. All rights reserved.