Package org.objectweb.jorm.compiler.api

Examples of org.objectweb.jorm.compiler.api.JormCompilerConfigurator


            return false;
        }
        logger = scp.loggerFactory.getLogger(LOGGER_NAME);
        jormcompiler = new JormCompiler();
        JormCompilerParameter jcp = jormcompiler.getCompilerParameter();
        JormCompilerConfigurator jcc = jormcompiler.getCompilerConfigurator();
        try {
            jcc.configure();
            jcp.loadConfFile(jcc.getGlobalJormcOptsFile(), jcc.knownMappers());
            jcc.setLoggerFactory(scp.loggerFactory);
            int idx = scp.mapperName.indexOf('.');
            if (idx == -1) {
                jcc.removeMapper(scp.mapperName);
                jcc.addSubMapper(scp.mapperName, "generic");
            } else {
                String actualmn = scp.mapperName.substring(0, idx);
                jcc.removeMapper(actualmn);
                jcc.addSubMapper(actualmn, scp.mapperName.substring(idx + 1));
            }
            if (logger.isLoggable(BasicLevel.DEBUG)) {
                logger.log(BasicLevel.DEBUG, "jormcOpts file:"
                        + jcc.getJormcOptsFile());
                Iterator it = jcc.knownMappers();
                while (it.hasNext()) {
                    String mapperName = (String) it.next();
                    logger.log(BasicLevel.DEBUG, mapperName + " sub mappers: "
                            + jcc.getSubMappers(mapperName));
                }
            }
        } catch (PException e) {
            logger.log(BasicLevel.ERROR, "Impossible to configure Jorm",
                    ExceptionHelper.getNested(e));
View Full Code Here

TOP

Related Classes of org.objectweb.jorm.compiler.api.JormCompilerConfigurator

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.