Interface Node
-
- All Superinterfaces:
Renderable
- All Known Implementing Classes:
ASTAddNode
,ASTAndNode
,ASTAssignment
,ASTBlock
,ASTComment
,ASTDirective
,ASTDivNode
,ASTElseIfStatement
,ASTElseStatement
,ASTEQNode
,ASTEscape
,ASTEscapedDirective
,ASTExpression
,ASTFalse
,ASTFloatingPointLiteral
,ASTGENode
,ASTGTNode
,ASTIdentifier
,ASTIfStatement
,ASTIncludeStatement
,ASTIndex
,ASTIntegerLiteral
,ASTIntegerRange
,ASTLENode
,ASTLTNode
,ASTMap
,ASTMathNode
,ASTMethod
,ASTModNode
,ASTMulNode
,ASTNENode
,ASTNotNode
,ASTObjectArray
,ASTOrNode
,ASTParameters
,ASTprocess
,ASTReference
,ASTSetDirective
,ASTStringLiteral
,ASTSubtractNode
,ASTText
,ASTTextblock
,ASTTrue
,ASTVariable
,ASTWord
,SimpleNode
public interface Node extends Renderable
This file describes the interface between the Velocity code and the JavaCC generated code.- Version:
- $Id: Node.java 737539 2009-01-25 17:24:29Z nbubna $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
childrenAccept(ParserVisitor visitor, java.lang.Object data)
boolean
evaluate(InternalContextAdapter context)
java.lang.Object
execute(java.lang.Object o, InternalContextAdapter context)
int
getColumn()
Token
getFirstToken()
int
getInfo()
Token
getLastToken()
int
getLine()
java.lang.String
getTemplateName()
int
getType()
java.lang.Object
init(InternalContextAdapter context, java.lang.Object data)
boolean
isInvalid()
java.lang.Object
jjtAccept(ParserVisitor visitor, java.lang.Object data)
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.java.lang.String
literal()
boolean
render(InternalContextAdapter context, java.io.Writer writer)
void
setInfo(int info)
void
setInvalid()
Mark the node as invalid.java.lang.Object
value(InternalContextAdapter context)
-
-
-
Method Detail
-
jjtOpen
void jjtOpen()
This method is called after the node has been made the current node. It indicates that child nodes can now be added to it.
-
jjtClose
void jjtClose()
This method is called after all the child nodes have been added.
-
jjtSetParent
void jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent.- Parameters:
n
-
-
jjtGetParent
Node jjtGetParent()
- Returns:
- The node parent.
-
jjtAddChild
void jjtAddChild(Node n, int i)
This method tells the node to add its argument to the node's list of children.- Parameters:
n
-i
-
-
jjtGetChild
Node jjtGetChild(int i)
This method returns a child node. The children are numbered from zero, left to right.- Parameters:
i
-- Returns:
- A child node.
-
jjtGetNumChildren
int jjtGetNumChildren()
Return the number of children the node has.- Returns:
- The number of children of this node.
-
jjtAccept
java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
- Parameters:
visitor
-data
-- Returns:
- The Node execution result object.
-
childrenAccept
java.lang.Object childrenAccept(ParserVisitor visitor, java.lang.Object data)
- Parameters:
visitor
-data
-- Returns:
- The node execution result.
- See Also:
jjtAccept(ParserVisitor, Object)
-
getFirstToken
Token getFirstToken()
- Returns:
- The first token.
-
getLastToken
Token getLastToken()
- Returns:
- The last token.
-
getType
int getType()
- Returns:
- The NodeType.
-
init
java.lang.Object init(InternalContextAdapter context, java.lang.Object data) throws TemplateInitException
- Parameters:
context
-data
-- Returns:
- The init result.
- Throws:
TemplateInitException
-
evaluate
boolean evaluate(InternalContextAdapter context) throws MethodInvocationException
- Parameters:
context
-- Returns:
- The evaluation result.
- Throws:
MethodInvocationException
-
value
java.lang.Object value(InternalContextAdapter context) throws MethodInvocationException
- Parameters:
context
-- Returns:
- The node value.
- Throws:
MethodInvocationException
-
render
boolean render(InternalContextAdapter context, java.io.Writer writer) throws java.io.IOException, MethodInvocationException, ParseErrorException, ResourceNotFoundException
- Specified by:
render
in interfaceRenderable
- Parameters:
context
-writer
-- Returns:
- True if the node rendered successfully.
- Throws:
java.io.IOException
MethodInvocationException
ParseErrorException
ResourceNotFoundException
-
execute
java.lang.Object execute(java.lang.Object o, InternalContextAdapter context) throws MethodInvocationException
- Parameters:
o
-context
-- Returns:
- The execution result.
- Throws:
MethodInvocationException
-
setInfo
void setInfo(int info)
- Parameters:
info
-
-
getInfo
int getInfo()
- Returns:
- The current node info.
-
literal
java.lang.String literal()
- Returns:
- A literal.
-
setInvalid
void setInvalid()
Mark the node as invalid.
-
isInvalid
boolean isInvalid()
- Returns:
- True if the node is invalid.
-
getLine
int getLine()
- Returns:
- The current line position.
-
getColumn
int getColumn()
- Returns:
- The current column position.
-
getTemplateName
java.lang.String getTemplateName()
- Returns:
- the file name of the template
-
-