Class LambdaConverter
java.lang.Object
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter
com.thoughtworks.xstream.converters.reflection.SerializableConverter
com.thoughtworks.xstream.converters.reflection.LambdaConverter
- All Implemented Interfaces:
Converter, ConverterMatcher, Caching
Converts a lambda type.
The implementation maps any non-serializable lambda instance to
null.- Since:
- 1.4.8
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractReflectionConverter
AbstractReflectionConverter.DuplicateFieldException, AbstractReflectionConverter.UnknownFieldException -
Field Summary
Fields inherited from class AbstractReflectionConverter
mapper, reflectionProvider, serializationMembers, serializationMethodInvoker -
Constructor Summary
ConstructorsConstructorDescriptionLambdaConverter(Mapper mapper, ReflectionProvider reflectionProvider, ClassLoaderReference classLoaderReference) Constructs a LambdaConverter. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(Class type) Determines whether the converter can marshall a particular type.voidmarshal(Object original, HierarchicalStreamWriter writer, MarshallingContext context) Convert an object to textual data.Methods inherited from class SerializableConverter
doMarshal, doMarshalConditionally, doUnmarshal, doUnmarshalConditionally, hierarchyFor, marshalUnserializableParentMethods inherited from class AbstractReflectionConverter
canAccess, flushCache, instantiateNewInstance, marshallField, readResolve, shouldUnmarshalField, shouldUnmarshalTransientFields, unmarshal, unmarshallField
-
Constructor Details
-
LambdaConverter
public LambdaConverter(Mapper mapper, ReflectionProvider reflectionProvider, ClassLoaderReference classLoaderReference) Constructs a LambdaConverter.- Parameters:
mapper-reflectionProvider-classLoaderReference-- Since:
- 1.4.8
-
-
Method Details
-
canConvert
Description copied from interface:ConverterMatcherDetermines whether the converter can marshall a particular type.- Specified by:
canConvertin interfaceConverterMatcher- Overrides:
canConvertin classSerializableConverter- Parameters:
type- the Class representing the object type to be converted
-
marshal
Description copied from interface:ConverterConvert an object to textual data.- Specified by:
marshalin interfaceConverter- Overrides:
marshalin classAbstractReflectionConverter- Parameters:
original- The object to be marshalled.writer- A stream to write to.context- A context that allows nested objects to be processed by XStream.
-