Package net.sf.ehcache.config.generator.model

Examples of net.sf.ehcache.config.generator.model.XMLGeneratorVisitor


     * @return text representing the {@link Configuration}
     */
    public static String generateCacheManagerConfigurationText(Configuration configuration) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        PrintWriter out = new PrintWriter(baos);
        XMLGeneratorVisitor configGenerator = new XMLGeneratorVisitor(out);
        configGenerator.disableOutputBehavior(OutputBehavior.OUTPUT_OPTIONAL_ATTRIBUTES_WITH_DEFAULT_VALUES);
        visitConfiguration(configuration, configGenerator);
        out.flush();
        out.close();
        return baos.toString();
    }
View Full Code Here


     * @return text representing the {@link CacheConfiguration}
     */
    public static String generateCacheConfigurationText(CacheConfiguration cacheConfiguration) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        PrintWriter out = new PrintWriter(baos);
        XMLGeneratorVisitor configGenerator = new XMLGeneratorVisitor(out);
        configGenerator.disableOutputBehavior(OutputBehavior.OUTPUT_OPTIONAL_ATTRIBUTES_WITH_DEFAULT_VALUES);
        visitCacheConfiguration(cacheConfiguration, configGenerator);
        out.flush();
        out.close();
        return baos.toString();
    }
View Full Code Here

TOP

Related Classes of net.sf.ehcache.config.generator.model.XMLGeneratorVisitor

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.