net.sf.japaki.kit
Class MessageParserMold

java.lang.Object
  extended by net.sf.japaki.kit.LeafParserMold<Object[]>
      extended by net.sf.japaki.kit.MessageParserMold
All Implemented Interfaces:
ParserMold<Object[]>

public class MessageParserMold
extends LeafParserMold<Object[]>

Parser mold based on a MessageFormat.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.japaki.kit.ParserMold
ParserMold.Parameter
 
Constructor Summary
protected MessageParserMold()
          Creates a new message parser mold for the default locale.
  MessageParserMold(Locale locale)
          Creates a new message parser mold.
 
Method Summary
protected  Format getFormat(String pattern)
          Returns the format of the parser to be created.
static MessageParserMold getInstance()
          Returns an instance of this class for the default locale.
 
Methods inherited from class net.sf.japaki.kit.LeafParserMold
getErrorMessage, getFormat, getName, getParser, getTargetType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageParserMold

public MessageParserMold(Locale locale)
Creates a new message parser mold.

Parameters:
locale - see MessageFormat
Throws:
NullPointerException - if locale is null

MessageParserMold

protected MessageParserMold()
Creates a new message parser mold for the default locale.

Method Detail

getInstance

public static final MessageParserMold getInstance()
Returns an instance of this class for the default locale.

Returns:
the default instance for this class

getFormat

protected Format getFormat(String pattern)
Description copied from class: LeafParserMold
Returns the format of the parser to be created.

Specified by:
getFormat in class LeafParserMold<Object[]>
Parameters:
pattern - the pattern describing the format
Returns:
format of the parser to be created
Throws:
IllegalArgumentException - if the given pattern is invalid