net.sf.japaki.kit
Class MultiLineParserMold

java.lang.Object
  extended by net.sf.japaki.kit.MultiLineParserMold
All Implemented Interfaces:
ParserMold<String>

public class MultiLineParserMold
extends Object
implements ParserMold<String>

Parser mold based on a MultiLineTransformer.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.japaki.kit.ParserMold
ParserMold.Parameter
 
Constructor Summary
protected MultiLineParserMold()
          Creates a new multi line parser mold.
  MultiLineParserMold(String defaultDelimiter, int linesize)
          Creates a new multi line parser mold with the given parameters.
 
Method Summary
static MultiLineParserMold getInstance()
          Returns the default instance of this class.
<B> Parser<B>
getParser(Property<B,String> property, ParserMold.Parameter parameter)
          Creates a parser for a multline string field.
 Class<String> getTargetType()
          Returns the target type of the parsers created by this mold.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiLineParserMold

public MultiLineParserMold(String defaultDelimiter,
                           int linesize)
Creates a new multi line parser mold with the given parameters.

Parameters:
defaultDelimiter - delimiter for new formats. If the default delimiter is null, it must be specified in getParser.
linesize - the maximum size of an output line

MultiLineParserMold

protected MultiLineParserMold()
Creates a new multi line parser mold.

Method Detail

getInstance

public static final MultiLineParserMold getInstance()
Returns the default instance of this class.

Returns:
the default instance of this class

getParser

public <B> Parser<B> getParser(Property<B,String> property,
                               ParserMold.Parameter parameter)
Creates a parser for a multline string field.

Specified by:
getParser in interface ParserMold<String>
Parameters:
property - property of the created parser
parameter - pattern - specifies the delimiter (see RegexFormat)
Returns:
new parser
Throws:
NullPointerException - if property is null

getTargetType

public Class<String> getTargetType()
Description copied from interface: ParserMold
Returns the target type of the parsers created by this mold.

Specified by:
getTargetType in interface ParserMold<String>
Returns:
the target type of the parsers created by this mold