Package com.thoughtworks.xstream.converters.reflection

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


    /** {@inheritDoc} */
    public void execute() throws MojoExecutionException {
        try {
            InputStream stream = findTemplateSuiteDescriptor();
            XStream xstream = new XStream(new Sun14ReflectionProvider());
            TemplateSuite suite = (TemplateSuite) xstream.fromXML(stream);
            stream.close();

            Properties props = new Properties();
            InputStream propsStream = getClass().getResourceAsStream("/org/apache/tiles/autotag/velocity.properties");
View Full Code Here


        mavenProject.addResource(isA(Resource.class));

        replay(mavenProject);
        mojo.execute();
        InputStream sis = new FileInputStream(new File(temp, "META-INF/template-suite.xml"));
        XStream xstream = new XStream(new Sun14ReflectionProvider());
        TemplateSuite suite = (TemplateSuite) xstream.fromXML(sis);
        sis.close();
        assertEquals("test", suite.getName());
        assertEquals("This are the docs", suite.getDocumentation());
        assertEquals(3, suite.getTemplateClasses().size());
View Full Code Here

    public void testDeserializationWithDefaultMode() throws ParserConfigurationException, IOException, SAXException, ClassNotFoundException {
        runDeserializationTest(new XStreamComponentInstanceFactory());
    }

    public void testDeserializationInEncancedMode() throws ParserConfigurationException, IOException, SAXException, ClassNotFoundException {
        runDeserializationTest(new XStreamComponentInstanceFactory(new XStream(new Sun14ReflectionProvider())));
    }
View Full Code Here

        classAliasingMapper.addClassAlias("x", X.class);
        classAliasingMapper.addClassAlias("software", Software.class);
        classAliasingMapper.addClassAlias("open-source", OpenSourceSoftware.class);
        mapper = new DefaultImplementationsMapper(new ArrayMapper(classAliasingMapper));

        reflectionProvider = new Sun14ReflectionProvider();

        converterLookup = new DefaultConverterLookup();
        converterLookup.registerConverter(
            new SingleValueConverterWrapper(new StringConverter()), 0);
        converterLookup.registerConverter(
View Full Code Here

   * Extension point to define your own provider.
   *
   * @return
   */
  private ReflectionProvider getProvider() {
    return new EnhancedLookupProvider(new Sun14ReflectionProvider());
  }
View Full Code Here

   * Extension point to define your own provider.
   *
   * @return
   */
  private ReflectionProvider getProvider() {
    return new EnhancedLookupProvider(new Sun14ReflectionProvider());
  }
View Full Code Here

   * Extension point to define your own provider.
   *
   * @return
   */
  protected ReflectionProvider getProvider() {
    return new EnhancedLookupProvider(new Sun14ReflectionProvider());
  }
View Full Code Here

TOP

Related Classes of com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider

Copyright © 2018 www.massapicom. 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.