net.sf.japaki.kit
Class CollectionParserMold<V extends Collection<E>,E>

java.lang.Object
  extended by net.sf.japaki.kit.SuperParserMold<V,SinglePropertyBean<E>,SinglePropertyBean<E>>
      extended by net.sf.japaki.kit.CollectionParserMold<V,E>

public class CollectionParserMold<V extends Collection<E>,E>
extends SuperParserMold<V,SinglePropertyBean<E>,SinglePropertyBean<E>>

Parser mold for collections.


Constructor Summary
CollectionParserMold(Class<V> targetType, Factory<? extends V> factory)
          Constructs a collection parser mold from the given arguments.
 
Method Summary
 ParserMold<V> createMold(Parser<SinglePropertyBean<E>> parser, Parser<Object> delParser)
          Creates a new parser mold.
static
<V extends Collection<Object>>
CollectionParserMold<V,Object>
newInstance(Class<V> targetType)
          Constructs a collection 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

CollectionParserMold

public CollectionParserMold(Class<V> targetType,
                            Factory<? extends V> factory)
Constructs a collection parser mold from the given arguments.

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

newInstance

public static <V extends Collection<Object>> CollectionParserMold<V,Object> newInstance(Class<V> targetType)
Constructs a collection parser mold from the given arguments.

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

createMold

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

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