Package ch.grengine.code

Examples of ch.grengine.code.Bytecode


     * LoadMode.CURRENT_FIRST: Instead in loadClass(..) tries first to load the class
     *   from bytecode, then tries the other two options.
     */
   
    private Class<?> loadClassFromBytecode(final String name) {
        Bytecode bc = code.getBytecode(name);
        if (bc == null) {
            return null;
        }
       
        byte[] bytes = bc.getBytes();
        // define class if not already defined by another thread
        Class<?> clazz;
        synchronized(this) {
            if ((clazz = findLoadedClass(name)) == null) {
                definePackage(name);
View Full Code Here


            @SuppressWarnings("unchecked")
            List<GroovyClass> groovyClasses = cu.getClasses();
            Map<String, Bytecode> bytecodes = new HashMap<String,Bytecode>();
            for (GroovyClass groovyClass : groovyClasses) {
                String name = groovyClass.getName();
                bytecodes.put(name, new Bytecode(name, groovyClass.getBytes()));
            }

            Code code;
            if (sourceSet.size() == 1) {
                code = new DefaultSingleSourceCode(sources.getName(), compiledSourceInfos, bytecodes);
View Full Code Here

TOP

Related Classes of ch.grengine.code.Bytecode

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.