hudson.plugins.labeledgroupedtests.converters
Class OpenCppunitPublisherConverter

java.lang.Object
  extended by hudson.plugins.labeledgroupedtests.converters.ConvertToLabeledGroupsConverter
      extended by hudson.plugins.labeledgroupedtests.converters.OpenCppunitPublisherConverter
All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher

public class OpenCppunitPublisherConverter
extends ConvertToLabeledGroupsConverter

User: Benjamin Shine bshine Date: Nov 30, 2009 Time: 1:47:14 PM


Field Summary
 
Fields inherited from class hudson.plugins.labeledgroupedtests.converters.ConvertToLabeledGroupsConverter
CPPUNIT_PARSER_TO_USE, ENABLE_CONVERSIONS, JUNIT_PARSER_TO_USE, LOGGER, OPEN_CPPUNIT_PLUGIN_CLASS_NAME
 
Constructor Summary
OpenCppunitPublisherConverter()
           
 
Method Summary
 boolean canConvert(java.lang.Class type)
          Determines whether the converter can marshall a particular type.
 void marshal(java.lang.Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
          This method will be called to save old cppunit publishers to disk, but we do not want to allow that save operation if this plugin is installed.
static void registerWithXStream(com.thoughtworks.xstream.XStream xstream)
           
 java.lang.Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
          Convert textual data back into an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenCppunitPublisherConverter

public OpenCppunitPublisherConverter()
Method Detail

marshal

public void marshal(java.lang.Object source,
                    com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
                    com.thoughtworks.xstream.converters.MarshallingContext context)
This method will be called to save old cppunit publishers to disk, but we do not want to allow that save operation if this plugin is installed. It shouldn't even try to happen.


unmarshal

public java.lang.Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
                                  com.thoughtworks.xstream.converters.UnmarshallingContext context)
Convert textual data back into an object.

Parameters:
reader - The stream to read the text from.
context -
Returns:
The resulting object.

canConvert

public boolean canConvert(java.lang.Class type)
Determines whether the converter can marshall a particular type. Note that the cppunit class still has to be present at runtime; that's an XStream requirement, not a hudson requirement.

Parameters:
type - the Class representing the object type to be converted

registerWithXStream

public static void registerWithXStream(com.thoughtworks.xstream.XStream xstream)


Copyright © 2015 Yahoo!, Inc.. All Rights Reserved.