Java Code Examples for com.thoughtworks.xstream.XStream#getMapper()

The following examples show how to use com.thoughtworks.xstream.XStream#getMapper() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jease   File: Serializer.java    License: GNU General Public License v3.0 5 votes vote down vote up
public Serializer() {
	xstream = new XStream();
	xstream.registerConverter(new BlobConverter());
	nodeConverter = new SingleValueConverterWrapper(new NodeConverter());
	nodeArrayConverter = new DelegateArrayConverter(nodeConverter,
			xstream.getMapper());
}
 
Example 2
Source Project: depan   File: RelationSetConverters.java    License: Apache License 2.0 5 votes vote down vote up
public static void configXStream(XStream xstream) {
  Mapper mapper = xstream.getMapper();
  new ForValue(RelationSets.ALL).registerWithTag(
      xstream, RELATION_SET_ALL_TAG);
  new ForValue(RelationSets.EMPTY).registerWithTag(
      xstream, RELATION_SET_EMPTY_TAG);

  new ForArray(mapper).registerWithTag(
      xstream, RELATION_SET_ARRAY_TAG);
  new ForSimple(mapper).registerWithTag(
      xstream, RELATION_SET_SIMPLE_TAG);
  new ForSingle(mapper).registerWithTag(
      xstream, RELATION_SET_SINGLE_TAG);
}
 
Example 3
public FileConverter(XStream xstream) {
    this.defaultConverter = new ReflectionConverter(xstream.getMapper(), xstream.getReflectionProvider());
}
 
Example 4
Source Project: depan   File: ViewDocumentConverter.java    License: Apache License 2.0 4 votes vote down vote up
public static ViewDocumentConverter configXStream(XStream xstream) {
  ViewDocumentConverter result =
      new ViewDocumentConverter(xstream.getMapper());
  result.registerWithTag(xstream, VIEW_INFO_TAG);
  return result;
}
 
Example 5
Source Project: depan   File: NodeListDocumentConverter.java    License: Apache License 2.0 4 votes vote down vote up
public static NodeListDocumentConverter configXStream(XStream xstream) {
  NodeListDocumentConverter result =
      new NodeListDocumentConverter(xstream.getMapper());
  result.registerWithTag(xstream, NODE_LIST_INFO_TAG);
  return result;
}