Package org.gocha.jvm

Examples of org.gocha.jvm.MemoryClassLoader.loadClass()


        try{
            byte[] data = FileUtil.readAllData(new FileInputStream(bytecodeClassFile), true);
            MemoryByteCode byteCode = new MemoryByteCode(clsName, data);
            MemoryClassLoader memClassLoader = new MemoryClassLoader();
            memClassLoader.getClassDataMap().put(clsName, byteCode);
            Class cls = memClassLoader.loadClass(clsName);
           
            Constructor constr = cls.getConstructor(Map.class);
            Object inst = constr.newInstance(mmap);
           
            TemplateCompiler.CompileResult res = new CompileResult(
View Full Code Here


//           
//            if( !compileFiles(memClassLoader.getClassDataMap(), sources) ){
//                throw new Error("Ошибка компиляции");
//            }
           
            Class clazz = memClassLoader.loadClass(_className);
            Constructor constructor = clazz.getConstructor(Map.class);
            Object instance = constructor.newInstance(templates);
           
            return new CompileResult(memClassLoader, sources, instance, source.getDefaultTemplates());
        } catch (InstantiationException ex) {
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.