Package hudson.util
Class RobustCollectionConverter
java.lang.Object
com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
com.thoughtworks.xstream.converters.collections.CollectionConverter
hudson.util.RobustCollectionConverter
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter,com.thoughtworks.xstream.converters.ConverterMatcher
- Direct Known Subclasses:
NodeList.ConverterImpl
public class RobustCollectionConverter
extends com.thoughtworks.xstream.converters.collections.CollectionConverter
CollectionConverter that ignores XStreamException.
This allows Hudson to load XML files that contain non-existent classes (the expected scenario is that those classes belong to plugins that were unloaded.)
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
ConstructorsConstructorDescriptionRobustCollectionConverter(com.thoughtworks.xstream.mapper.Mapper mapper, com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider) RobustCollectionConverter(com.thoughtworks.xstream.XStream xs) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(Class type) protected voidpopulateCollection(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, Collection collection) unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) Methods inherited from class com.thoughtworks.xstream.converters.collections.CollectionConverter
addCurrentElementToCollection, createCollection, marshal, populateCollectionMethods inherited from class com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter
mapper, readBareItem, readCompleteItem, readItem, writeBareItem, writeCompleteItem, writeItem, writeNullItem
-
Constructor Details
-
RobustCollectionConverter
public RobustCollectionConverter(com.thoughtworks.xstream.XStream xs) -
RobustCollectionConverter
public RobustCollectionConverter(com.thoughtworks.xstream.mapper.Mapper mapper, com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)
-
-
Method Details
-
canConvert
- Specified by:
canConvertin interfacecom.thoughtworks.xstream.converters.ConverterMatcher- Overrides:
canConvertin classcom.thoughtworks.xstream.converters.collections.CollectionConverter
-
unmarshal
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) - Specified by:
unmarshalin interfacecom.thoughtworks.xstream.converters.Converter- Overrides:
unmarshalin classcom.thoughtworks.xstream.converters.collections.CollectionConverter
-
populateCollection
protected void populateCollection(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, Collection collection) - Overrides:
populateCollectionin classcom.thoughtworks.xstream.converters.collections.CollectionConverter
-