public class SimpleNode extends java.lang.Object implements Node
| 限定符和类型 | 字段和说明 |
|---|---|
protected Node[] |
children |
protected Token |
first |
protected int |
id |
protected int |
info |
protected boolean |
invalid |
protected Token |
last |
protected Log |
log |
protected Node |
parent |
protected Parser |
parser |
protected RuntimeServices |
rsvc |
boolean |
state |
protected java.lang.String |
templateName |
| 构造器和说明 |
|---|
SimpleNode(int i) |
SimpleNode(Parser p,
int i) |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Object |
childrenAccept(ParserVisitor visitor,
java.lang.Object data) |
void |
dump(java.lang.String prefix)
Override this method if you want to customize how the node dumps
out its children.
|
boolean |
evaluate(InternalContextAdapter context) |
java.lang.Object |
execute(java.lang.Object o,
InternalContextAdapter context) |
Node[] |
getChildren() |
int |
getColumn() |
Token |
getFirstToken() |
int |
getInfo() |
Token |
getLastToken() |
int |
getLine() |
protected java.lang.String |
getLocation(InternalContextAdapter context)
Return a string that tells the current location of this node.
|
RuntimeServices |
getRuntimeServices() |
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 |
setFirstToken(Token t) |
void |
setInfo(int info) |
void |
setInvalid()
Mark the node as invalid.
|
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String prefix) |
java.lang.Object |
value(InternalContextAdapter context) |
protected RuntimeServices rsvc
protected Log log
protected Node parent
protected Node[] children
protected int id
protected Parser parser
protected int info
public boolean state
protected boolean invalid
protected Token first
protected Token last
protected java.lang.String templateName
public SimpleNode(int i)
i - public SimpleNode(Parser p, int i)
p - i - public RuntimeServices getRuntimeServices()
public void jjtOpen()
NodejjtOpen 在接口中 NodeNode.jjtOpen()public void jjtClose()
NodejjtClose 在接口中 NodeNode.jjtClose()public void setFirstToken(Token t)
t - public Token getFirstToken()
getFirstToken 在接口中 NodeNode.getFirstToken()public Token getLastToken()
getLastToken 在接口中 NodeNode.getLastToken()public void jjtSetParent(Node n)
Nodepublic Node jjtGetParent()
jjtGetParent 在接口中 NodeNode.jjtGetParent()public void jjtAddChild(Node n, int i)
Nodepublic Node jjtGetChild(int i)
NodejjtGetChild 在接口中 NodeNode.jjtGetChild(int)public int jjtGetNumChildren()
NodejjtGetNumChildren 在接口中 NodeNode.jjtGetNumChildren()public java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
jjtAccept 在接口中 NodeNode.jjtAccept(bboss.org.apache.velocity.runtime.parser.node.ParserVisitor, java.lang.Object)public java.lang.Object childrenAccept(ParserVisitor visitor, java.lang.Object data)
childrenAccept 在接口中 NodeNode.childrenAccept(bboss.org.apache.velocity.runtime.parser.node.ParserVisitor, java.lang.Object)public java.lang.String toString(java.lang.String prefix)
prefix - public void dump(java.lang.String prefix)
prefix - protected java.lang.String getLocation(InternalContextAdapter context)
public java.lang.String literal()
literal 在接口中 NodeNode.literal()public java.lang.Object init(InternalContextAdapter context, java.lang.Object data) throws TemplateInitException
init 在接口中 NodeTemplateInitExceptionNode.init(bboss.org.apache.velocity.context.InternalContextAdapter, java.lang.Object)public boolean evaluate(InternalContextAdapter context) throws MethodInvocationException
evaluate 在接口中 NodeMethodInvocationExceptionNode.evaluate(bboss.org.apache.velocity.context.InternalContextAdapter)public java.lang.Object value(InternalContextAdapter context) throws MethodInvocationException
value 在接口中 NodeMethodInvocationExceptionNode.value(bboss.org.apache.velocity.context.InternalContextAdapter)public boolean render(InternalContextAdapter context, java.io.Writer writer) throws java.io.IOException, MethodInvocationException, ParseErrorException, ResourceNotFoundException
render 在接口中 Noderender 在接口中 Renderablejava.io.IOExceptionMethodInvocationExceptionParseErrorExceptionResourceNotFoundExceptionNode.render(bboss.org.apache.velocity.context.InternalContextAdapter, java.io.Writer)public java.lang.Object execute(java.lang.Object o,
InternalContextAdapter context)
throws MethodInvocationException
execute 在接口中 NodeMethodInvocationExceptionNode.execute(java.lang.Object, bboss.org.apache.velocity.context.InternalContextAdapter)public int getType()
getType 在接口中 NodeNode.getType()public void setInfo(int info)
setInfo 在接口中 NodeNode.setInfo(int)public int getInfo()
getInfo 在接口中 NodeNode.getInfo()public void setInvalid()
NodesetInvalid 在接口中 NodeNode.setInvalid()public boolean isInvalid()
isInvalid 在接口中 NodeNode.isInvalid()public int getLine()
getLine 在接口中 NodeNode.getLine()public int getColumn()
getColumn 在接口中 NodeNode.getColumn()public java.lang.String toString()
toString 在类中 java.lang.Objectpublic java.lang.String getTemplateName()
getTemplateName 在接口中 Nodepublic Node[] getChildren()