Package com.alibaba.otter.shared.common.utils.compile.exception

Examples of com.alibaba.otter.shared.common.utils.compile.exception.JdkCompileException


        // Get a CompliationTask from the compiler and compile the sources
        final CompilationTask task = compiler.getTask(null, javaFileManager, diagnostics, options, null, sources);
        final Boolean result = task.call();
        if (result == null || !result.booleanValue()) {
            throw new JdkCompileException("Compilation failed.", classes.keySet(), diagnostics);
        }

        try {
            // For each class name in the inpput map, get its compiled class and put it in the output map
            for (String qualifiedClassName : classes.keySet()) {
                final Class<T> newClass = loadClass(qualifiedClassName);
                compiled.put(qualifiedClassName, (Class<?>) newClass);
            }

            return compiled;
        } catch (ClassNotFoundException e) {
            throw new JdkCompileException(classes.keySet(), e, diagnostics);
        } catch (IllegalArgumentException e) {
            throw new JdkCompileException(classes.keySet(), e, diagnostics);
        } catch (SecurityException e) {
            throw new JdkCompileException(classes.keySet(), e, diagnostics);
        }
    }
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.common.utils.compile.exception.JdkCompileException

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.