Package org.gocha.jvm

Examples of org.gocha.jvm.MemoryByteCode


        String clsName = getClassName();
        if (clsName== null) throw new IllegalStateException("getClassName()==null");
       
        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);
View Full Code Here


                memSource = src;
            }
        }
        if (memSource == null )return false;
       
        MemoryByteCode byteCode = cr.getClassLoader().getClassDataMap().get(clsName);
        if (byteCode == null)return false;
       
        FileOutputStream fout = null;
        try {
            FileUtil.writeAllText(srcFile, FileUtil.UTF8(),memSource.getSourceCode());

            fout = new FileOutputStream(bytecodeFile);
            fout.write(byteCode.getByteCode());
            fout.close();
        } catch (IOException ex) {
            Logger.getLogger(LocalMessagesImplementor.class.getName()).log(Level.SEVERE, null, ex);
            return false;
        } finally {
View Full Code Here

           
            String sClassName = oClassName.toString();
            Object _data = bcl.getClasses().get(oClassName);
            byte[] data = (byte[])_data;
           
            result.add(new MemoryByteCode(sClassName, data));
        }
       
        return result;
    }
View Full Code Here

TOP

Related Classes of org.gocha.jvm.MemoryByteCode

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.