com.cedarsoft.serialization
Class AbstractDelegatingSerializer<T>
java.lang.Object
com.cedarsoft.serialization.AbstractSerializer<T>
com.cedarsoft.serialization.AbstractDelegatingSerializer<T>
- Type Parameters:
T - the type
- All Implemented Interfaces:
- ExtendedSerializer<T>, Serializer<T,Lookup>
public class AbstractDelegatingSerializer<T>
- extends AbstractSerializer<T>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractDelegatingSerializer
public AbstractDelegatingSerializer(@NotNull
java.lang.String defaultElementName,
@NotNull
SerializingStrategy<? extends T>... strategies)
AbstractDelegatingSerializer
public AbstractDelegatingSerializer(@NotNull
java.lang.String defaultElementName,
@NotNull
java.util.Collection<? extends SerializingStrategy<? extends T>> strategies)
serialize
@NotNull
public org.jdom.Element serialize(@NotNull
org.jdom.Element element,
@NotNull
T object,
@NotNull
Lookup context)
throws java.io.IOException
- Description copied from class:
AbstractSerializer
- Serializes the object to the given element
- Specified by:
serialize in class AbstractSerializer<T>
- Parameters:
element - the elementobject - the objectcontext - the context
- Returns:
- the element (for fluent writing)
- Throws:
java.io.IOException
deserialize
@NotNull
public T deserialize(@NotNull
org.jdom.Element element,
@NotNull
Lookup context)
throws java.io.IOException
- Description copied from class:
AbstractSerializer
- Deserializes the object from the diven document
- Specified by:
deserialize in class AbstractSerializer<T>
- Parameters:
element - the elementcontext - the context
- Returns:
- the deserialized object
- Throws:
java.io.IOException
getStrategies
@NotNull
public java.util.Collection<? extends SerializingStrategy<? extends T>> getStrategies()
Copyright © 2009 cedarsoft GmbH. All Rights Reserved.