org.cubeengine.converter.converter.generic
Class CollectionConverter

java.lang.Object
  extended by org.cubeengine.converter.converter.generic.CollectionConverter
All Implemented Interfaces:
Converter<Collection,ParameterizedType>, GenericConverter<Collection>

public class CollectionConverter
extends Object
implements GenericConverter<Collection>

Converts ListNode to Collection and vice versa


Constructor Summary
CollectionConverter()
           
 
Method Summary
 Collection fromNode(Node node, ParameterizedType pType, ConverterManager manager)
          Converts the node back into the original object
static Collection getCollectionFor(ParameterizedType ptype)
           
 ListNode toNode(Collection collection, ConverterManager manager)
          Converts the object into a serializable Node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionConverter

public CollectionConverter()
Method Detail

getCollectionFor

public static Collection getCollectionFor(ParameterizedType ptype)
                                   throws IllegalAccessException,
                                          InstantiationException
Throws:
IllegalAccessException
InstantiationException

toNode

public ListNode toNode(Collection collection,
                       ConverterManager manager)
                throws ConversionException
Description copied from interface: Converter
Converts the object into a serializable Node

Specified by:
toNode in interface Converter<Collection,ParameterizedType>
Parameters:
collection - the object to convert
manager - the ConverterManager
Returns:
the converted object
Throws:
ConversionException

fromNode

public Collection fromNode(Node node,
                           ParameterizedType pType,
                           ConverterManager manager)
                    throws ConversionException
Description copied from interface: Converter
Converts the node back into the original object

Specified by:
fromNode in interface Converter<Collection,ParameterizedType>
Parameters:
node - the node to convert
pType - the type to convert to
manager - the manager
Returns:
the converted node
Throws:
ConversionException


Copyright © 2013–2017. All rights reserved.