|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Node
All AST nodes must implement this interface. It provides basic machinery for constructing the parent and child relationships between nodes.
Method Summary | |
---|---|
Object |
childrenAccept(ParserVisitor visitor,
Object data)
|
boolean |
evaluate(InternalContextAdapter context)
|
Object |
execute(Object o,
InternalContextAdapter context)
|
int |
getColumn()
|
Token |
getFirstToken()
|
int |
getInfo()
|
Token |
getLastToken()
|
int |
getLine()
|
String |
getLocation(InternalContextAdapter ctx)
Get the location of the node. |
String |
getLocation(String templateName)
Get the location of the node. |
int |
getType()
|
Object |
init(InternalContextAdapter context,
Object data)
|
boolean |
isInvalid()
|
Object |
jjtAccept(ParserVisitor visitor,
Object data)
Accept the visitor. |
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's list of children. |
void |
jjtClose()
This method is called after all the child nodes have been added. |
Node |
jjtGetChild(int i)
This method returns a child node. |
int |
jjtGetNumChildren()
Return the number of children the node has. |
Node |
jjtGetParent()
|
void |
jjtOpen()
This method is called after the node has been made the current node. |
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent. |
String |
literal()
|
boolean |
render(InternalContextAdapter context,
Writer writer)
|
void |
setInfo(int info)
|
void |
setInvalid()
|
Object |
value(InternalContextAdapter context)
|
Method Detail |
---|
void jjtOpen()
void jjtClose()
void jjtSetParent(Node n)
Node jjtGetParent()
void jjtAddChild(Node n, int i)
Node jjtGetChild(int i)
int jjtGetNumChildren()
Object jjtAccept(ParserVisitor visitor, Object data)
Object childrenAccept(ParserVisitor visitor, Object data)
Token getFirstToken()
Token getLastToken()
int getType()
Object init(InternalContextAdapter context, Object data) throws Exception
Exception
boolean evaluate(InternalContextAdapter context) throws MethodInvocationException
MethodInvocationException
Object value(InternalContextAdapter context) throws MethodInvocationException
MethodInvocationException
boolean render(InternalContextAdapter context, Writer writer) throws IOException, MethodInvocationException, ParseErrorException, ResourceNotFoundException
IOException
MethodInvocationException
ParseErrorException
ResourceNotFoundException
Object execute(Object o, InternalContextAdapter context) throws MethodInvocationException
MethodInvocationException
void setInfo(int info)
int getInfo()
String literal()
void setInvalid()
boolean isInvalid()
int getLine()
int getColumn()
String getLocation(InternalContextAdapter ctx)
ctx
- the node context (the node itself does not
know the name of the template, which contains it).
$templateName#$macroName [line $line, column $col]:
String getLocation(String templateName)
templateName
- template name to use (the node itself does not
know the name of the template, which contains it).
$templateName#$macroName [line $line, column $col]:
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |