JTools

org.jtools.tmpl.compiler.parser.handler
Class SimpleNodeHandler

java.lang.Object
  extended by org.jtools.tmpl.compiler.parser.handler.SimpleNodeHandler
All Implemented Interfaces:
NodeHandler
Direct Known Subclasses:
SimpleParser, XmlNodeHandler

public class SimpleNodeHandler
extends Object
implements NodeHandler


Field Summary
protected  boolean addEmptyLinebreaks
           
protected  StringBuffer current
           
protected static char[] EMPTY
           
protected  Collection<Tag> endTags
           
protected  Collection<Tag> escapeTags
           
protected  boolean flushedOnLinebreak
           
protected  List<char[]> lines
           
protected  Node node
           
protected  NodeHandler parent
           
protected  NodeParser parser
           
 
Constructor Summary
protected SimpleNodeHandler()
           
  SimpleNodeHandler(NodeParser parser, NodeHandler parent, Node node)
           
 
Method Summary
 void addChar(char c)
           
 void addLinebreak()
           
 void embed(NodeHandler handler)
           
 void flush()
           
 Collection<Node> getChildNodes()
           
 Collection<Tag> getEndTags()
           
 Collection<Tag> getEscapeTags()
           
static NodeHandler.Factory getFactory()
           
 InfoSupport getInfoSupport()
           
 Node getNode()
           
 NodeParser getNodeParser()
           
 int getOuterCol()
           
 int getOuterLine()
           
 NodeHandler getParent()
           
 char[][] getText()
           
 String getTextAsString()
           
 boolean isEndOnLinebreak()
           
 boolean isLineDelimited()
           
 Tag onChild(NodeHandler child)
           
 Tag onNode()
           
 void setOuterCol(int x)
           
 void setOuterLine(int x)
           
 void setText(char[][] txt)
           
 void setText(String txt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

protected static final char[] EMPTY

addEmptyLinebreaks

protected boolean addEmptyLinebreaks

current

protected StringBuffer current

endTags

protected Collection<Tag> endTags

escapeTags

protected Collection<Tag> escapeTags

flushedOnLinebreak

protected boolean flushedOnLinebreak

lines

protected List<char[]> lines

node

protected final Node node

parent

protected final NodeHandler parent

parser

protected NodeParser parser
Constructor Detail

SimpleNodeHandler

protected SimpleNodeHandler()

SimpleNodeHandler

public SimpleNodeHandler(NodeParser parser,
                         NodeHandler parent,
                         Node node)
Method Detail

getFactory

public static NodeHandler.Factory getFactory()

addChar

public void addChar(char c)
Specified by:
addChar in interface NodeHandler

addLinebreak

public void addLinebreak()
Specified by:
addLinebreak in interface NodeHandler

embed

public void embed(NodeHandler handler)

flush

public void flush()

getChildNodes

public Collection<Node> getChildNodes()
Specified by:
getChildNodes in interface NodeHandler

getEndTags

public Collection<Tag> getEndTags()
Specified by:
getEndTags in interface NodeHandler

getEscapeTags

public Collection<Tag> getEscapeTags()
Specified by:
getEscapeTags in interface NodeHandler

getNode

public final Node getNode()
Specified by:
getNode in interface NodeHandler

getNodeParser

public NodeParser getNodeParser()
Specified by:
getNodeParser in interface NodeHandler

getOuterCol

public int getOuterCol()
Specified by:
getOuterCol in interface NodeHandler

getOuterLine

public int getOuterLine()
Specified by:
getOuterLine in interface NodeHandler

getParent

public final NodeHandler getParent()
Specified by:
getParent in interface NodeHandler

getInfoSupport

public InfoSupport getInfoSupport()
Specified by:
getInfoSupport in interface NodeHandler

getText

public char[][] getText()
Specified by:
getText in interface NodeHandler

getTextAsString

public String getTextAsString()
Specified by:
getTextAsString in interface NodeHandler

isEndOnLinebreak

public boolean isEndOnLinebreak()
Specified by:
isEndOnLinebreak in interface NodeHandler

isLineDelimited

public boolean isLineDelimited()
Specified by:
isLineDelimited in interface NodeHandler

onChild

public Tag onChild(NodeHandler child)
            throws IOException,
                   CompilerException
Specified by:
onChild in interface NodeHandler
Throws:
IOException
CompilerException

onNode

public Tag onNode()
           throws IOException,
                  CompilerException
Specified by:
onNode in interface NodeHandler
Throws:
IOException
CompilerException

setOuterCol

public void setOuterCol(int x)
Specified by:
setOuterCol in interface NodeHandler

setOuterLine

public void setOuterLine(int x)
Specified by:
setOuterLine in interface NodeHandler

setText

public void setText(char[][] txt)
Specified by:
setText in interface NodeHandler

setText

public void setText(String txt)
Specified by:
setText in interface NodeHandler

JTools

© 2000-2006, JTools.org.