org.cubeengine.converter.converter.generic
Class CollectionConverter
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionConverter
public CollectionConverter()
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 convertmanager - 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 convertpType - the type to convert tomanager - the manager
- Returns:
- the converted node
- Throws:
ConversionException
Copyright © 2013–2017. All rights reserved.