com.cedarsoft.serialization.stax
Class AbstractDelegatingStaxMateSerializer<T>

java.lang.Object
  extended by com.cedarsoft.serialization.AbstractSerializer<T,org.codehaus.staxmate.out.SMOutputElement,org.codehaus.stax2.XMLStreamReader2,javax.xml.stream.XMLStreamException>
      extended by com.cedarsoft.serialization.stax.AbstractStaxMateSerializer<T>
          extended by com.cedarsoft.serialization.stax.AbstractDelegatingStaxMateSerializer<T>
Type Parameters:
T - the type
All Implemented Interfaces:
ExtendedSerializer<T>, PluggableSerializer<T,org.codehaus.staxmate.out.SMOutputElement,org.codehaus.stax2.XMLStreamReader2,javax.xml.stream.XMLStreamException>, Serializer<T,Lookup>

public class AbstractDelegatingStaxMateSerializer<T>
extends AbstractStaxMateSerializer<T>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.cedarsoft.serialization.stax.AbstractStaxMateSerializer
AbstractStaxMateSerializer.CB
 
Constructor Summary
AbstractDelegatingStaxMateSerializer(java.lang.String defaultElementName, java.util.Collection<? extends StaxMateSerializingStrategy<? extends T>> strategies)
           
AbstractDelegatingStaxMateSerializer(java.lang.String defaultElementName, StaxMateSerializingStrategy<? extends T>... strategies)
           
 
Method Summary
 T deserialize(org.codehaus.stax2.XMLStreamReader2 deserializeFrom, Lookup context)
          Deserializes the object from the given document
 java.util.Collection<? extends StaxMateSerializingStrategy<T>> getStrategies()
           
 org.codehaus.staxmate.out.SMOutputElement serialize(org.codehaus.staxmate.out.SMOutputElement serializeTo, T object, Lookup context)
          Serializes the object to the given element
 
Methods inherited from class com.cedarsoft.serialization.stax.AbstractStaxMateSerializer
closeTag, deserialize, ensureTag, getChildText, getText, nextTag, serialize, visitChildren
 
Methods inherited from class com.cedarsoft.serialization.AbstractSerializer
deserialize, getDefaultElementName, serialize, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDelegatingStaxMateSerializer

public AbstractDelegatingStaxMateSerializer(@NotNull
                                            java.lang.String defaultElementName,
                                            @NotNull
                                            StaxMateSerializingStrategy<? extends T>... strategies)

AbstractDelegatingStaxMateSerializer

public AbstractDelegatingStaxMateSerializer(@NotNull
                                            java.lang.String defaultElementName,
                                            @NotNull
                                            java.util.Collection<? extends StaxMateSerializingStrategy<? extends T>> strategies)
Method Detail

serialize

@NotNull
public org.codehaus.staxmate.out.SMOutputElement serialize(@NotNull
                                                                   org.codehaus.staxmate.out.SMOutputElement serializeTo,
                                                                   @NotNull
                                                                   T object,
                                                                   @NotNull
                                                                   Lookup context)
                                                    throws java.io.IOException
Description copied from interface: PluggableSerializer
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

deserialize

@NotNull
public T deserialize(@NotNull
                             org.codehaus.stax2.XMLStreamReader2 deserializeFrom,
                             @NotNull
                             Lookup context)
              throws java.io.IOException,
                     javax.xml.stream.XMLStreamException
Description copied from interface: PluggableSerializer
Deserializes the object from the given document

Parameters:
deserializeFrom - the deserializeFrom
context - the context
Returns:
the deserialized object
Throws:
java.io.IOException
javax.xml.stream.XMLStreamException

getStrategies

@NotNull
public java.util.Collection<? extends StaxMateSerializingStrategy<T>> getStrategies()


Copyright © 2009 cedarsoft GmbH. All Rights Reserved.