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

Type Parameters:
T - the type
C - the type of the context
S - the object to serialize to
D - the object to deserialize from
E - the exception that might be thrown
All Superinterfaces:
Serializer<T,C>
All Known Subinterfaces:
JDomSerializingStrategy<T,C>, SerializingStrategy<T,C,S,D,E>, StaxMateSerializingStrategy<T,C>, StaxSerializingStrategy<T,C>
All Known Implementing Classes:
AbstractDelegatingJDomSerializer, AbstractDelegatingStaxMateSerializer, AbstractJDomSerializer, AbstractJDomSerializingStrategy, AbstractSerializer, AbstractStaxBasedSerializer, AbstractStaxMateSerializer, AbstractStaxMateSerializingStrategy, AbstractStaxSerializer, AbstractStaxSerializingStrategy, DateTimeSerializer, DimensionSerializer, VersionSerializer

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

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, C context)
          Deserializes the object from the given document
 S serialize(S serializeTo, T object, C context)
          Serializes the object to the given element
 
Methods inherited from interface com.cedarsoft.serialization.Serializer
deserialize, getFormatVersion, serialize
 

Method Detail

serialize

@NotNull
S serialize(@NotNull
                    S serializeTo,
                    @NotNull
                    T object,
                    @Nullable
                    C 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,
                      @Nullable
                      C 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.