org.sakaiproject.component.gradebook
Class VersionedExternalizable.Converter

java.lang.Object
  extended by com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
      extended by org.sakaiproject.component.gradebook.VersionedExternalizable.Converter
All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher
Enclosing class:
VersionedExternalizable

public static class VersionedExternalizable.Converter
extends com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter

This XStream converter stores the externalizable version of the class as a Document-level attribute for easy access by translators. Right now, though, since we don't have any version translators, we don't try to reconstitute XML corresponding to anything but the current version.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.DuplicateFieldException
 
Field Summary
 
Fields inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
mapper, reflectionProvider, serializationMethodInvoker
 
Constructor Summary
VersionedExternalizable.Converter(com.thoughtworks.xstream.mapper.Mapper mapper, com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)
           
 
Method Summary
 boolean canConvert(Class type)
           
 Object doUnmarshal(Object result, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
           
 void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
           
 
Methods inherited from class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
doMarshal, instantiateNewInstance, marshallField, unmarshal, unmarshallField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionedExternalizable.Converter

public VersionedExternalizable.Converter(com.thoughtworks.xstream.mapper.Mapper mapper,
                                         com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)
Method Detail

canConvert

public boolean canConvert(Class type)

marshal

public void marshal(Object source,
                    com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
                    com.thoughtworks.xstream.converters.MarshallingContext context)
Specified by:
marshal in interface com.thoughtworks.xstream.converters.Converter
Overrides:
marshal in class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter

doUnmarshal

public Object doUnmarshal(Object result,
                          com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
                          com.thoughtworks.xstream.converters.UnmarshallingContext context)
Overrides:
doUnmarshal in class com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter


Copyright © 2011 Sakai Project. All Rights Reserved.