net.sf.japaki.kit
Class MapParserMold<T extends Map<K,V>,K,V>

java.lang.Object
  extended by net.sf.japaki.kit.SuperParserMold<T,KeyValueBean<K,V>,KeyValueBean<K,V>>
      extended by net.sf.japaki.kit.MapParserMold<T,K,V>

public class MapParserMold<T extends Map<K,V>,K,V>
extends SuperParserMold<T,KeyValueBean<K,V>,KeyValueBean<K,V>>

Parser mold for maps.


Constructor Summary
MapParserMold(Class<T> targetType, Factory<? extends T> factory)
          Constructs a map parser mold from the given arguments.
 
Method Summary
 ParserMold<T> createMold(Parser<KeyValueBean<K,V>> parser, Parser<Object> delParser)
          Creates a new parser mold.
static
<V extends Map<Object,Object>>
MapParserMold<V,Object,Object>
newInstance(Class<V> targetType)
          Constructs a map parser mold from the given arguments.
 
Methods inherited from class net.sf.japaki.kit.SuperParserMold
createMold, getFactory, getProperty, getTargetType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapParserMold

public MapParserMold(Class<T> targetType,
                     Factory<? extends T> factory)
Constructs a map parser mold from the given arguments.

Parameters:
targetType - the target type of the parsers created by this mold
factory - a factory that creates new maps
Method Detail

newInstance

public static <V extends Map<Object,Object>> MapParserMold<V,Object,Object> newInstance(Class<V> targetType)
Constructs a map parser mold from the given arguments.

Parameters:
targetType - the target type of the parsers created by this mold
Returns:
the new map mold

createMold

public ParserMold<T> createMold(Parser<KeyValueBean<K,V>> parser,
                                Parser<Object> delParser)
Description copied from class: SuperParserMold
Creates a new parser mold.

Specified by:
createMold in class SuperParserMold<T extends Map<K,V>,KeyValueBean<K,V>,KeyValueBean<K,V>>
Parameters:
parser - sub- or element parser
delParser - delimiter parser
Returns:
the new mold
Throws:
NullPointerException - if parser is null