org.jboss.jca.codegenerator
Class SimpleTemplate

java.lang.Object
  extended by org.jboss.jca.codegenerator.SimpleTemplate
All Implemented Interfaces:
Template

public class SimpleTemplate
extends Object
implements Template

A SimpleTemplate.

Version:
$Revision: $
Author:
Jeff Zhang

Constructor Summary
SimpleTemplate(String input)
          SimpleTemplate
SimpleTemplate(URL input)
          SimpleTemplate
 
Method Summary
 void process(Map<String,String> varMap, Writer out)
          Processes the template
 String replace(Map<String,String> varMap)
          Replace string in the template text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTemplate

public SimpleTemplate(String input)
SimpleTemplate

Parameters:
input - template string

SimpleTemplate

public SimpleTemplate(URL input)
SimpleTemplate

Parameters:
input - template string
Method Detail

process

public void process(Map<String,String> varMap,
                    Writer out)
Processes the template

Specified by:
process in interface Template
Parameters:
varMap - variable map
out - the writer to output the text to.

replace

public String replace(Map<String,String> varMap)
Replace string in the template text

Parameters:
varMap - variable map
Returns:
replaced string


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)