Class JavaMethodConverter
java.lang.Object
com.thoughtworks.xstream.converters.extended.JavaMethodConverter
- All Implemented Interfaces:
Converter
,ConverterMatcher
Converts a java.lang.reflect.Method to XML.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JavaMethodConverter
(SingleValueConverter javaClassConverter) Construct a JavaMethodConverter.JavaMethodConverter
(ClassLoaderReference classLoaderReference) Construct a JavaMethodConverter.JavaMethodConverter
(ClassLoader classLoader) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canConvert
(Class type) Determines whether the converter can marshall a particular type.void
marshal
(Object source, HierarchicalStreamWriter writer, MarshallingContext context) Convert an object to textual data.private void
marshalMethod
(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 theClassLoader
of 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:ConverterMatcher
Determines whether the converter can marshall a particular type.- Specified by:
canConvert
in interfaceConverterMatcher
- Parameters:
type
- the Class representing the object type to be converted
-
marshal
Description copied from interface:Converter
Convert an object to textual data. -
marshalMethod
private void marshalMethod(HierarchicalStreamWriter writer, String declaringClassName, String methodName, Class[] parameterTypes) -
unmarshal
Description copied from interface:Converter
Convert textual data back into an object.
-
JavaMethodConverter(ClassLoaderReference)