net.sf.japaki.kit
Interface ParserMold<V>

All Known Implementing Classes:
DateParserMold, DecimalParserMold, DurationParserMold, FixedFormatMold, FixedParserMold, LeafParserMold, MessageParserMold, MultiLineParserMold, RegexParserMold

public interface ParserMold<V>

Bean to store parser properties before creating the parser.


Nested Class Summary
static class ParserMold.Parameter
          Parameters given to a mold to specify the characteristics of a parser or its underlying format.
 
Method Summary
<B> Parser<B>
getParser(Property<B,V> property, ParserMold.Parameter parameter)
          Creates a parser for the specified property and pattern.
 Class<V> getTargetType()
          Returns the target type of the parsers created by this mold.
 

Method Detail

getParser

<B> Parser<B> getParser(Property<B,V> property,
                        ParserMold.Parameter parameter)
Creates a parser for the specified property and pattern.

Parameters:
property - property of the created parser
parameter - the set of parameters for the parser.
Returns:
new parser
Throws:
NullPointerException - if parameter is null or if property or some parameter is null and this mold does not allow it.
IllegalArgumentException - if the pattern cannot be interpreted by this mold.

getTargetType

Class<V> getTargetType()
Returns the target type of the parsers created by this mold.

Returns:
the target type of the parsers created by this mold