Package com.jd.glowworm.asm

Examples of com.jd.glowworm.asm.ClassWriter.toByteArray()


        _init(cw, new Context(className, config, beanInfo, 3));
        _createInstance(cw, new Context(className, config, beanInfo, 3));
        _deserialze(cw, new Context(className, config, beanInfo, 4));

        byte[] code = cw.toByteArray();

        /*org.apache.commons.io.IOUtils.write(code, new java.io.FileOutputStream(
          "d:/"+ className + ".class"));*/

        Class<?> exampleClass = classLoader.defineClassPublic(className, code, 0, code.length);
View Full Code Here


                mw.visitMaxs(3, 3);
                mw.visitEnd();
            }
        }

        byte[] code = cw.toByteArray();

        Class<?> exampleClass = classLoader.defineClassPublic(className, code, 0, code.length);

        Constructor<?> constructor = exampleClass.getConstructor(PBDeserializer.class, Class.class, FieldInfo.class);
        Object instance = constructor.newInstance(mapping, clazz, fieldInfo);
View Full Code Here

            mw.visitInsn(RETURN);
            mw.visitMaxs(5, context.getVariantCount() + 1);
            mw.visitEnd();
        }
       
        byte[] code = cw.toByteArray();
       
        /*org.apache.commons.io.IOUtils.write(code, new java.io.FileOutputStream(
            "D:/"+ className + ".class"));*/

        Class<?> exampleClass = classLoader.defineClassPublic(className, code, 0, code.length);
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.