com.cedarsoft.serialization
Interface SerializingStrategy<T,S,D>

Type Parameters:
T - the type for this strategy
S - the serializing object
D - the deserializing object
All Known Subinterfaces:
JDomSerializingStrategy<T>, StaxMateSerializingStrategy<T>
All Known Implementing Classes:
AbstractJDomSerializingStrategy, AbstractStaxMateSerializingStrategy

public interface SerializingStrategy<T,S,D>


Method Summary
 T deserialize(D deserializeFrom)
          Deserializes the file reference
 java.lang.String getId()
          Returns the id
 S serialize(S serializeTo, T object)
          Serializes the reference
 boolean supports(java.lang.Object object)
          Whether the given reference type is supported
 

Method Detail

getId

@NotNull
@NonNls
java.lang.String getId()
Returns the id

Returns:
the id

supports

boolean supports(@NotNull
                 java.lang.Object object)
Whether the given reference type is supported

Parameters:
object - the reference
Returns:
true if this strategy supports the reference, false otherwise

serialize

@NotNull
S serialize(@NotNull
                    S serializeTo,
                    @NotNull
                    T object)
            throws java.io.IOException
Serializes the reference

Parameters:
serializeTo - the serializeTo
object - the object
Returns:
the output serializeTo (for fluent usage)
Throws:
java.io.IOException

deserialize

@NotNull
T deserialize(@NotNull@NonNls
                      D deserializeFrom)
              throws java.io.IOException
Deserializes the file reference

Parameters:
deserializeFrom - the deserializeFrom
Returns:
the file reference
Throws:
java.io.IOException


Copyright © 2009 cedarsoft GmbH. All Rights Reserved.