net.sf.jtpl
Class Template

java.lang.Object
  extended by net.sf.jtpl.Template

public class Template
extends Object

The forward compatible template engine interface, replacing Jtpl.


Constructor Summary
Template(File templateFile)
           
Template(Reader template)
           
Template(String templateSource)
           
 
Method Summary
 Template assign(String varName, String varData)
           
protected  void assignAll(Object bean)
           
protected  Map getBeanProperties(Object bean)
           
 String out()
           
 String out(Object bean)
           
 Template parse(String blockName)
           
 Template parse(String blockName, Object bean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Template

public Template(Reader template)
         throws IOException
Throws:
IOException

Template

public Template(String templateSource)

Template

public Template(File templateFile)
         throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

assign

public Template assign(String varName,
                       String varData)

parse

public Template parse(String blockName)
               throws IllegalArgumentException
Throws:
IllegalArgumentException

out

public String out()

parse

public Template parse(String blockName,
                      Object bean)

out

public String out(Object bean)

assignAll

protected void assignAll(Object bean)

getBeanProperties

protected Map getBeanProperties(Object bean)
Parameters:
bean - The instance that has properties named according to JavaBean standard.
Returns:
Map that should be considered immutable


Copyright © 2009. All Rights Reserved.