JTools

org.jtools.tmpl.compiler.parser
Class SimpleParser

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

public class SimpleParser
extends SimpleNodeHandler
implements Parser


Nested Class Summary
protected static class SimpleParser.Factory
           
protected  class SimpleParser.OnChildVisitor
           
 
Field Summary
protected  char[][] image
           
protected  NodeVisitor<Tag,NodeHandler> onChildVisitor
           
 
Fields inherited from class org.jtools.tmpl.compiler.parser.handler.SimpleNodeHandler
addEmptyLinebreaks, current, EMPTY, endTags, escapeTags, flushedOnLinebreak, lines, node, parent, parser
 
Constructor Summary
SimpleParser(PropertySupport props)
           
 
Method Summary
protected  void addImage(boolean allwaysLB)
           
 void addStyles(boolean ow, Collection<Style> x)
           
 void addStyles(boolean ow, Style... x)
           
 Collection<Node> getChildNodes()
           
 Collection<Tag> getEndTags()
           
 String getFileName()
           
 InfoSupport getInfoSupport()
           
static ParserFactory getParserFactory()
           
 Template getTemplate()
           
 boolean isLineDelimited()
           
 Tag onChild(NodeHandler child)
           
 Tag onNode()
           
 void parse(Template template, String filename, InputStream input, ParserCallback callback)
           
 
Methods inherited from class org.jtools.tmpl.compiler.parser.handler.SimpleNodeHandler
addChar, addLinebreak, embed, flush, getEscapeTags, getFactory, getNode, getNodeParser, getOuterCol, getOuterLine, getParent, getText, getTextAsString, isEndOnLinebreak, setOuterCol, setOuterLine, setText, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

protected char[][] image

onChildVisitor

protected NodeVisitor<Tag,NodeHandler> onChildVisitor
Constructor Detail

SimpleParser

public SimpleParser(PropertySupport props)
Method Detail

getParserFactory

public static ParserFactory getParserFactory()

addImage

protected void addImage(boolean allwaysLB)
                 throws IOException,
                        CompilerException
Throws:
IOException
CompilerException

addStyles

public void addStyles(boolean ow,
                      Style... x)
Specified by:
addStyles in interface Parser

addStyles

public void addStyles(boolean ow,
                      Collection<Style> x)
Specified by:
addStyles in interface Parser

getChildNodes

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

getEndTags

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

getFileName

public String getFileName()

getInfoSupport

public InfoSupport getInfoSupport()
Specified by:
getInfoSupport in interface NodeHandler
Specified by:
getInfoSupport in interface Parser
Overrides:
getInfoSupport in class SimpleNodeHandler

getTemplate

public Template getTemplate()
Specified by:
getTemplate in interface Parser

isLineDelimited

public boolean isLineDelimited()
Specified by:
isLineDelimited in interface NodeHandler
Overrides:
isLineDelimited in class SimpleNodeHandler

onChild

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

onNode

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

parse

public void parse(Template template,
                  String filename,
                  InputStream input,
                  ParserCallback callback)
           throws IOException,
                  CompilerException
Specified by:
parse in interface Parser
Throws:
IOException
CompilerException

JTools

© 2000-2006, JTools.org.