public class TagNode extends Node
| Constructor and Description |
|---|
TagNode(ResourcePointer ptr,
Tag tag) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canChain(Node nextNode)
Checks whether this
Node can chain to the given node. |
static TagNode |
create(Token token,
Configuration config)
|
static TagNode |
createEcho(Token token,
Configuration config)
Creates a special
TagNode for an echo token. |
Tag |
getTag() |
boolean |
isEndBlock() |
void |
render(CarrotEngine engine,
java.io.Writer writer,
Scope scope)
Render this node to the given
Writer. |
add, chain, getChildren, getNextNode, getPointer, isBlockNode, renderChildrenpublic TagNode(ResourcePointer ptr, Tag tag)
public static TagNode createEcho(Token token, Configuration config) throws CarrotException
TagNode for an echo token.token - The Token the echo node is going to created from, must have Token.getType() of
TokenType.ECHO.config - The current Configuration.TagNode.CarrotException - if there's a problem parsing the token.public static TagNode create(Token token, Configuration config) throws CarrotException
token - The Token the node is going to created from, must have Token.getType() of
TokenType.TAG.config - The current Configuration.TagNode.CarrotException - if there's a problem parsing the token.public boolean canChain(Node nextNode)
NodeNode can chain to the given node.public boolean isEndBlock()
public void render(CarrotEngine engine, java.io.Writer writer, Scope scope) throws CarrotException, java.io.IOException
NodeWriter.render in class Nodeengine - The CarrotEngine we're running inside of.writer - The Writer to write this node to.scope - The current Scope, containing all our variables.CarrotException - if there's an error parsing or rendering the node.java.io.IOException - if there's an error writing to the Writer.