hudson.plugins.labeledgroupedtests.converters
Class JUnitResultArchiverConverter

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

public class JUnitResultArchiverConverter
extends ConvertToLabeledGroupsConverter

User: Benjamin Shine bshine Date: Nov 16, 2009 Time: 1:49:19 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
JUnitResultArchiverConverter()
           
 
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)
          Write a JUnitResultArchiver out as a JUnitResultArchiver archiver -- not really the behavior you'd expect from a converter, but this particular converter only wants to run the conversion when a JUnitResultArchiver is unmarshaled.
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

JUnitResultArchiverConverter

public JUnitResultArchiverConverter()
Method Detail

marshal

public void marshal(java.lang.Object source,
                    com.thoughtworks.xstream.io.HierarchicalStreamWriter writer,
                    com.thoughtworks.xstream.converters.MarshallingContext context)
Write a JUnitResultArchiver out as a JUnitResultArchiver archiver -- not really the behavior you'd expect from a converter, but this particular converter only wants to run the conversion when a JUnitResultArchiver is unmarshaled. This lets users continue to edit configurations that include JUnitResultArchivers when this plugin is installed.

Parameters:
source - The object to be marshalled.
writer - A stream to write to.
context - A context that allows nested objects to be processed by XStream.

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.

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.