CSVObjects Framework

net.sf.anupam.csv.formatters
Class CSVFormatterFactory

java.lang.Object
  extended by net.sf.anupam.csv.formatters.CSVFormatterFactory

public final class CSVFormatterFactory
extends Object

A singleton factory which creates and caches the csv field formatters. The factory maintains a cache of CSV formatters that are reentrant (i.e., the formatters that do not maintain any instance specific state).

Since:
1.5
Version:
$Revision: 1.3 $
Author:
Anupam Sengupta
See Also:
CSVFieldFormatter

Method Summary
 CSVFieldFormatter createFormatterFor(String formatterName)
          Creates a new instance of the specified formatter.
static CSVFormatterFactory getSingleton()
          Returns the singleton instance of this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

public static CSVFormatterFactory getSingleton()
Returns the singleton instance of this factory.

Returns:
the singleton instance

createFormatterFor

public CSVFieldFormatter createFormatterFor(String formatterName)
                                     throws CSVOException
Creates a new instance of the specified formatter. The cache is used whenever possible.

Parameters:
formatterName - the formatter to return
Returns:
the requested formatter
Throws:
CSVOException - thrown if the formatter cannot be created

SourceForge.net Logo

© Anupam Sengupta 2005