Top Description Constructors Methods
com.thoughtworks.xstream.converters.reflection

public Class LambdaConverter

extends SerializableConverter
Class Inheritance
Imports
java.io.Serializable, com.thoughtworks.xstream.converters.MarshallingContext, com.thoughtworks.xstream.core.ClassLoaderReference, .JVM, com.thoughtworks.xstream.core.util.Types, com.thoughtworks.xstream.io.HierarchicalStreamWriter, com.thoughtworks.xstream.mapper.Mapper

Converts a lambda type. The implementation maps any non-serializable lambda instance to null.
Author
Jörg Schaible
Since
1.4.8

Constructor Summary

AccessConstructor and Description
public
LambdaConverter(final Mapper mapper, final ReflectionProvider reflectionProvider, final ClassLoaderReference classLoaderReference)

Constructs a LambdaConverter.

Method Summary

Modifier and TypeMethod and Description
public boolean
canConvert(final Class<T>
the Class representing the object type to be converted
type
)

Overrides com.thoughtworks.xstream.converters.reflection.SerializableConverter.canConvert.

Implements com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Determines whether the converter can marshall a particular type.
public void
marshal(final Object
The object to be marshalled.
original
,
final HierarchicalStreamWriter
A stream to write to.
writer
,
final MarshallingContext
A context that allows nested objects to be processed by XStream.
context
)

Overrides com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal.

Implements com.thoughtworks.xstream.converters.Converter.marshal.

Convert an object to textual data.
Inherited from com.thoughtworks.xstream.converters.reflection.SerializableConverter:
doMarshaldoMarshalConditionallydoUnmarshaldoUnmarshalConditionallyhierarchyFormarshalUnserializableParent

Constructor Detail

LambdaConverterback to summary
public LambdaConverter(final Mapper mapper, final ReflectionProvider reflectionProvider, final ClassLoaderReference classLoaderReference)

Constructs a LambdaConverter.

Since
1.4.8

Method Detail

canConvertback to summary
public boolean canConvert(final Class<T> type)

Overrides com.thoughtworks.xstream.converters.reflection.SerializableConverter.canConvert.

Implements com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Doc from com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Determines whether the converter can marshall a particular type.

Parameters
type:Class<T>

the Class representing the object type to be converted

Annotations
@Override
marshalback to summary
public void marshal(final Object original, final HierarchicalStreamWriter writer, final MarshallingContext context)

Overrides com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal.

Implements com.thoughtworks.xstream.converters.Converter.marshal.

Doc from com.thoughtworks.xstream.converters.Converter.marshal.

Convert an object to textual data.

Parameters
original:Object

The object to be marshalled.

writer:HierarchicalStreamWriter

A stream to write to.

context:MarshallingContext

A context that allows nested objects to be processed by XStream.

Annotations
@Override