Examples of PureJavaReflectionProvider


Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

  protected Map<XStreamConfiguration.ConverterSet, XStreamConfiguration.ConverterConfig> converterMap = Maps.newHashMap();

  @Inject
  public BeanXStreamConverter(XStreamConfiguration configuration) {
    rp = new PureJavaReflectionProvider();
    Mapper dmapper = new DefaultMapper(this.getClass().getClassLoader());
    /*
     * Putting this here means only one conversion per thread may be active at
     * any one time, but since the conversion process is atomic this will not
     * matter unless the class is extended.
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

    private static final Charset UTF8 = Charset.forName("UTF-8");

    @Test
    public void testSerialize_XStreamWithPureJavaReflectionProvider() {
        XStream xstream = new XStream(new PureJavaReflectionProvider());
        XStreamSerializer serializer = new XStreamSerializer(UTF8, xstream, new SerialVersionUIDRevisionResolver());

        StubAnnotatedAggregate aggregateRoot = new StubAnnotatedAggregate(UUID.randomUUID());
        aggregateRoot.doSomething();
        String xml = new String(serializer.serialize(aggregateRoot, byte[].class).getData(), UTF8);
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

* @author Jettro Coenradie
*/
public class GaeXStream extends XStream {

    public GaeXStream() {
        this(new PureJavaReflectionProvider(), new XppDriver(),
             new ClassLoaderReference(new CompositeClassLoader()));
    }
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

    /**
     * Constructs an instance using a GAE compatible instance of the XStreamSerializer.
     */
    public GaeEventStore() {
        this(new XStreamSerializer(new GaeXStream(new PureJavaReflectionProvider(), new XppDriver(),
                                                  new ClassLoaderReference(new CompositeClassLoader()))));
    }
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

* @see SolverFactory
*/
public class XmlSolverFactory implements SolverFactory {

    public static XStream buildXstream() {
        XStream xStream = new XStream(new PureJavaReflectionProvider(new FieldDictionary(new NativeFieldKeySorter())));
        xStream.setMode(XStream.ID_REFERENCES);
        xStream.processAnnotations(SolverConfig.class);
        xStream.processAnnotations(CustomSolverPhaseConfig.class);
        xStream.processAnnotations(BruteForceSolverPhaseConfig.class);
        xStream.processAnnotations(ConstructionHeuristicSolverPhaseConfig.class);
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

  private VRaptorClassMapper vraptorMapper;

  {setMode(NO_REFERENCES);}

  public VRaptorXStream(TypeNameExtractor extractor) {
    super(new PureJavaReflectionProvider());
    this.extractor = extractor;
  }
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

    super(new PureJavaReflectionProvider());
    this.extractor = extractor;
  }
 
  public VRaptorXStream(TypeNameExtractor extractor, HierarchicalStreamDriver hierarchicalStreamDriver) {
    super(new PureJavaReflectionProvider(),hierarchicalStreamDriver);
    this.extractor = extractor;
  }
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

      }
    };
    // Converter für die Hibernate-Collections
    xstream.registerConverter(new HibernateCollectionConverter(xstream.getConverterLookup()));
    xstream.registerConverter(
        new HibernateProxyConverter(xstream.getMapper(), new PureJavaReflectionProvider(), xstream.getConverterLookup()),
        XStream.PRIORITY_VERY_HIGH);
    xstream.setMarshallingStrategy(new XStreamMarshallingStrategy(XStreamMarshallingStrategy.RELATIVE));
    init(xstream);
    return xstream;
  }
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

  private XStream xs;

  public synchronized XStream buildXStream() {
    if (xs == null) {
      XStream xstream = new XStream(new PureJavaReflectionProvider(), new XMLHelper.SchemaTypeUsingStaxProvider());
      xstream.processAnnotations(ADL_CLASSES);
      addOmissions(xstream);
      xstream.setMarshallingStrategy(new IDSuppliedMarshallingStrategy());
      if (isSimplifyingXML()) {
        xstream.omitField(AbstractConnectedContained.class, "links");
View Full Code Here

Examples of com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider

  private VRaptorClassMapper vraptorMapper;

  {setMode(NO_REFERENCES);}

  public VRaptorXStream(TypeNameExtractor extractor) {
    super(new PureJavaReflectionProvider());
    this.extractor = extractor;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.