com.cedarsoft.serialization
Interface PluggableSerializer<T,S,D,E extends java.lang.Throwable>

Type Parameters:
T - the type
S - the object to serialize to
D - the object to deserialize from
E - the exception that might be thrown
All Superinterfaces:
ExtendedSerializer<T>, Serializer<T,Lookup>
All Known Implementing Classes:
AbstractDelegatingJDomSerializer, AbstractDelegatingStaxMateSerializer, AbstractJDomSerializer, AbstractJDomSerializingStrategy, AbstractSerializer, AbstractStaxMateSerializer, AbstractStaxMateSerializingStrategy, DateTimeSerializer, DimensionSerializer, VersionSerializer

public interface PluggableSerializer<T,S,D,E extends java.lang.Throwable>
extends ExtendedSerializer<T>

A pluggable serializer that can be used to stack several serializers together


Field Summary
 
Fields inherited from interface com.cedarsoft.serialization.Serializer
PI_TARGET_FORMAT
 
Method Summary
 T deserialize(D deserializeFrom, Lookup context)
          Deserializes the object from the given document
 S serialize(S serializeTo, T object, Lookup context)
          Serializes the object to the given element
 
Methods inherited from interface com.cedarsoft.serialization.ExtendedSerializer
deserialize, serialize, serialize
 
Methods inherited from interface com.cedarsoft.serialization.Serializer
deserialize, getFormatVersion, serialize
 

Method Detail

serialize

@NotNull
S serialize(@NotNull
                    S serializeTo,
                    @NotNull
                    T object,
                    @NotNull
                    Lookup context)
            throws java.io.IOException,
                   E extends java.lang.Throwable
Serializes the object to the given element

Parameters:
serializeTo - the serializeTo
object - the object
context - the context
Returns:
the serializeTo (for fluent writing)
Throws:
java.io.IOException
E extends java.lang.Throwable

deserialize

@NotNull
T deserialize(@NotNull
                      D deserializeFrom,
                      @NotNull
                      Lookup context)
              throws java.io.IOException,
                     E extends java.lang.Throwable
Deserializes the object from the given document

Parameters:
deserializeFrom - the deserializeFrom
context - the context
Returns:
the deserialized object
Throws:
java.io.IOException
E extends java.lang.Throwable


Copyright © 2009 cedarsoft GmbH. All Rights Reserved.