Package jasima.core.util
Class JasimaBeanConverter
- java.lang.Object
-
- com.thoughtworks.xstream.converters.javabean.JavaBeanConverter
-
- jasima.core.util.JasimaBeanConverter
-
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter
,com.thoughtworks.xstream.converters.ConverterMatcher
public class JasimaBeanConverter extends com.thoughtworks.xstream.converters.javabean.JavaBeanConverter
Converts beans serialized using the jasima GUI, which uses a slightly modified XML format. This converter can read input generated by plain XStream as well as jasima_gui'sPermissiveBeanConverter
.- Author:
- Robin Kreis
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
NULL_ATTRIBUTE_NAME
protected static String
NULL_ATTRIBUTE_VALUE
protected boolean
saveExtendedInfo
-
Constructor Summary
Constructors Constructor Description JasimaBeanConverter(com.thoughtworks.xstream.mapper.Mapper mapper, boolean saveExtendedInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<?>
determineType(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, Object result, String fieldName)
protected Object
instantiate(com.thoughtworks.xstream.converters.UnmarshallingContext context)
void
marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
Object
unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
-
-
Field Detail
-
NULL_ATTRIBUTE_NAME
protected static final String NULL_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
NULL_ATTRIBUTE_VALUE
protected static final String NULL_ATTRIBUTE_VALUE
- See Also:
- Constant Field Values
-
saveExtendedInfo
protected boolean saveExtendedInfo
-
-
Method Detail
-
marshal
public void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
- Specified by:
marshal
in interfacecom.thoughtworks.xstream.converters.Converter
- Overrides:
marshal
in classcom.thoughtworks.xstream.converters.javabean.JavaBeanConverter
-
unmarshal
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
- Specified by:
unmarshal
in interfacecom.thoughtworks.xstream.converters.Converter
- Overrides:
unmarshal
in classcom.thoughtworks.xstream.converters.javabean.JavaBeanConverter
-
instantiate
protected Object instantiate(com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
-