net.sourceforge.datagenerator.ant
Class DelegateDelimiterElement

java.lang.Object
  extended bynet.sourceforge.datagenerator.ant.DelegateDelimiterElement

public class DelegateDelimiterElement
extends java.lang.Object

The DelegateDelimiterElement provides an Ant wrapper for creating a delimiter formatter or a delimiter parser.

Version:
0.69
Author:
Chris Nagy

Field Summary
protected  java.util.Map plugins
          The mapping between custom types and implementations.
protected  java.util.List propertyElements
          The list of child property elements.
protected  DelimiterParserElement realParserElement
          The real delimiter parser element.
protected  java.lang.String type
          The delimiter formatter/parser type.
 
Constructor Summary
DelegateDelimiterElement(java.util.Map plugins)
          Creates a DelegateDelimiterElement with the given mapping between custom types and implementations.
 
Method Summary
 void addConfiguredProperty(PropertyElement element)
          Add a property element to the list of child property elements.
 BinaryDelimiterParser createBinaryDelimiterParser()
          Creates a binary delimiter parser and configures it with the list of property elements.
 DelimiterFormatter createDelimiterFormatter()
          Creates a delimiter formatter and configures it with the list of property elements.
 DelimiterParser createDelimiterParser()
          Creates a delimiter parser and configures it with the list of property elements.
protected  void initDelimiterParserElement()
          Creates the real delimiter parser element.
 boolean isBinaryDelimiterParser()
          Returns true if the delimiter parser is a binary delimiter parser.
 void setType(java.lang.String type)
          Sets the delimiter formatter/parser type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

plugins

protected java.util.Map plugins
The mapping between custom types and implementations.


type

protected java.lang.String type
The delimiter formatter/parser type.


propertyElements

protected java.util.List propertyElements
The list of child property elements.


realParserElement

protected DelimiterParserElement realParserElement
The real delimiter parser element.

Since:
0.74
Constructor Detail

DelegateDelimiterElement

public DelegateDelimiterElement(java.util.Map plugins)
Creates a DelegateDelimiterElement with the given mapping between custom types and implementations.

Parameters:
plugins - the plugin mappings
Method Detail

setType

public void setType(java.lang.String type)
Sets the delimiter formatter/parser type. The type should map to an implementation class.

Parameters:
type - the delimiter formatter/parser type

addConfiguredProperty

public void addConfiguredProperty(PropertyElement element)
Add a property element to the list of child property elements.

Parameters:
element - the property element

createDelimiterFormatter

public DelimiterFormatter createDelimiterFormatter()
Creates a delimiter formatter and configures it with the list of property elements.

Returns:
the delimiter formatter

createDelimiterParser

public DelimiterParser createDelimiterParser()
Creates a delimiter parser and configures it with the list of property elements.

Returns:
the delimiter parser

createBinaryDelimiterParser

public BinaryDelimiterParser createBinaryDelimiterParser()
Creates a binary delimiter parser and configures it with the list of property elements.

Returns:
the binary delimiter parser
Since:
0.74

isBinaryDelimiterParser

public boolean isBinaryDelimiterParser()
Returns true if the delimiter parser is a binary delimiter parser.

Returns:
Flag indicating that the delimiter parser is a binary delimiter parser
Since:
0.74

initDelimiterParserElement

protected void initDelimiterParserElement()
Creates the real delimiter parser element.

Since:
0.74