Class JavaMethodConverter
java.lang.Object
com.thoughtworks.xstream.converters.extended.JavaMethodConverter
- All Implemented Interfaces:
Converter, ConverterMatcher
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJavaMethodConverter(SingleValueConverter javaClassConverter) Construct a JavaMethodConverter.JavaMethodConverter(ClassLoaderReference classLoaderReference) Construct a JavaMethodConverter.JavaMethodConverter(ClassLoader classLoader) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(Class type) Determines whether the converter can marshall a particular type.voidmarshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) Convert an object to textual data.private voidmarshalMethod(HierarchicalStreamWriter writer, String declaringClassName, String methodName, Class[] parameterTypes) unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) Convert textual data back into an object.
-
Field Details
-
javaClassConverter
-
-
Constructor Details
-
JavaMethodConverter
Construct a JavaMethodConverter.- Parameters:
classLoaderReference- the reference to theClassLoaderof the XStream instance- Since:
- 1.4.5
-
JavaMethodConverter
Deprecated.As of 1.4.5 useJavaMethodConverter(ClassLoaderReference) -
JavaMethodConverter
Construct a JavaMethodConverter.- Parameters:
javaClassConverter- the converter to use- Since:
- 1.4.5
-
-
Method Details
-
canConvert
Description copied from interface:ConverterMatcherDetermines whether the converter can marshall a particular type.- Specified by:
canConvertin interfaceConverterMatcher- Parameters:
type- the Class representing the object type to be converted
-
marshal
Description copied from interface:ConverterConvert an object to textual data. -
marshalMethod
private void marshalMethod(HierarchicalStreamWriter writer, String declaringClassName, String methodName, Class[] parameterTypes) -
unmarshal
Description copied from interface:ConverterConvert textual data back into an object.
-
JavaMethodConverter(ClassLoaderReference)