com.atlassian.bamboo.persister.xstream
Class CustomizableXStreamFactory

java.lang.Object
  extended by com.atlassian.bamboo.persister.xstream.CustomizableXStreamFactory
All Implemented Interfaces:
XStreamFactory

public class CustomizableXStreamFactory
extends java.lang.Object
implements XStreamFactory

XStreamFactory that can be customized with XStream components: mappers, converters, initializers and aliases.

Since:
v3.3

Constructor Summary
CustomizableXStreamFactory(java.lang.Iterable<MapperFactory> customMappers, java.lang.Iterable<ConverterFactory> customConverters, java.lang.Iterable<XStreamInitializer> customInitializers, java.util.Map<java.lang.String,java.lang.Class<?>> customAliases)
           
 
Method Summary
 com.thoughtworks.xstream.XStream createCompactXStream()
          Create XStream backed by given classLoader and driver.
 com.thoughtworks.xstream.XStream createXStream()
          Create default instance of XStream.
 com.thoughtworks.xstream.XStream createXStream(java.lang.ClassLoader classLoader)
          Create XStream backed by given classLoader.
static XStreamFactory getDefaultInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomizableXStreamFactory

public CustomizableXStreamFactory(@NotNull
                                  java.lang.Iterable<MapperFactory> customMappers,
                                  @NotNull
                                  java.lang.Iterable<ConverterFactory> customConverters,
                                  @NotNull
                                  java.lang.Iterable<XStreamInitializer> customInitializers,
                                  @NotNull
                                  java.util.Map<java.lang.String,java.lang.Class<?>> customAliases)
Method Detail

getDefaultInstance

public static XStreamFactory getDefaultInstance()

createXStream

@NotNull
public com.thoughtworks.xstream.XStream createXStream()
Description copied from interface: XStreamFactory
Create default instance of XStream.

Specified by:
createXStream in interface XStreamFactory
Returns:
new XStream instance

createXStream

@NotNull
public com.thoughtworks.xstream.XStream createXStream(java.lang.ClassLoader classLoader)
Description copied from interface: XStreamFactory
Create XStream backed by given classLoader.

Specified by:
createXStream in interface XStreamFactory
Parameters:
classLoader - class loader to use by the created XStream, if null, the default classloader will be used
Returns:
new XStream instance

createCompactXStream

@NotNull
public com.thoughtworks.xstream.XStream createCompactXStream()
Description copied from interface: XStreamFactory
Create XStream backed by given classLoader and driver.

Specified by:
createCompactXStream in interface XStreamFactory
Returns:
new XStream instance
See Also:
HierarchicalStreamDriver


Copyright © 2012 Atlassian. All Rights Reserved.