Package com.thoughtworks.xstream

Examples of com.thoughtworks.xstream.XStream.registerConverter()


        xstream.alias("artifact", Artifact.class);
        xstream.addImmutableType(Artifact.class);

        // ConfigurationData
        xstream.alias("configurationData", ConfigurationData.class);
        xstream.registerConverter(new ConfigurationDataConverter(reflectionProvider, xstream.getClassMapper()));

        // ConfigurationModuleTypeConverter
        xstream.alias("moduleType", ConfigurationModuleType.class);
        xstream.addImmutableType(ConfigurationModuleType.class);
        xstream.registerConverter(new ConfigurationModuleTypeConverter());
View Full Code Here


        xstream.registerConverter(new ConfigurationDataConverter(reflectionProvider, xstream.getClassMapper()));

        // ConfigurationModuleTypeConverter
        xstream.alias("moduleType", ConfigurationModuleType.class);
        xstream.addImmutableType(ConfigurationModuleType.class);
        xstream.registerConverter(new ConfigurationModuleTypeConverter());

        // Dependency
        xstream.alias("dependency", Dependency.class);
        xstream.addImmutableType(Dependency.class);
View Full Code Here

        xstream.alias("dependency", Dependency.class);
        xstream.addImmutableType(Dependency.class);

        // GBeanData
        xstream.alias("gbean", GBeanData.class);
        xstream.registerConverter(new GBeanDataConverter(xstream.getClassMapper()));

        // GBeanInfo
        xstream.alias("gbean-info", GBeanInfo.class);

        // w3c Dom
View Full Code Here

        // GBeanInfo
        xstream.alias("gbean-info", GBeanInfo.class);

        // w3c Dom
        xstream.registerConverter(new DomConverter());

        // ImportType
        xstream.addImmutableType(ImportType.class);
        xstream.registerConverter(new ImportTypeConverter());
View Full Code Here

        // w3c Dom
        xstream.registerConverter(new DomConverter());

        // ImportType
        xstream.addImmutableType(ImportType.class);
        xstream.registerConverter(new ImportTypeConverter());

        // QName
        try {
            xstream.registerConverter(new QNameConverter());
        } catch (Exception e) {
View Full Code Here

        xstream.addImmutableType(ImportType.class);
        xstream.registerConverter(new ImportTypeConverter());

        // QName
        try {
            xstream.registerConverter(new QNameConverter());
        } catch (Exception e) {
            // cl can't see QName class so we don't need to register a converter for it
        }

        // Version
View Full Code Here

        }

        // Version
        xstream.alias("version", Version.class);
        xstream.addImmutableType(Version.class);
        xstream.registerConverter(new VersionConverter());

        // URI
        xstream.alias("uri", URI.class);
        xstream.addImmutableType(URI.class);
        xstream.registerConverter(new URIConverter());
View Full Code Here

        xstream.registerConverter(new VersionConverter());

        // URI
        xstream.alias("uri", URI.class);
        xstream.addImmutableType(URI.class);
        xstream.registerConverter(new URIConverter());

        // XStreamGBeanState
        xstream.registerConverter(new XStreamGBeanStateConverter());

        return xstream;
View Full Code Here

        xstream.alias("uri", URI.class);
        xstream.addImmutableType(URI.class);
        xstream.registerConverter(new URIConverter());

        // XStreamGBeanState
        xstream.registerConverter(new XStreamGBeanStateConverter());

        return xstream;
    }
}
View Full Code Here

        String outXml = new String( (byte[]) template.requestBody( "direct:test-no-session-custom",
                                                                   cmd ) );

        XStream xstream = BatchExecutionHelper.newXStreamMarshaller();
        PersonConverter converter = new PersonConverter();
        xstream.registerConverter( converter );

        ExecutionResults result = (ExecutionResults) xstream.fromXML( outXml );
        Person person = (Person) result.getValue( "salaboy" );
        assertEquals( "salaboy",
                      person.getName() );
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.