Package org.objectweb.asm

Examples of org.objectweb.asm.ClassWriter.visitEnd()


    }

    mw.visitInsn(RETURN);
    mw.visitMaxs(0, 0);
    mw.visitEnd();
    cw.visitEnd();
    byte[] code = cw.toByteArray();
    try {
      IParser parser = (IParser) DynamicClassLoader.getClass(name, code)
          .newInstance();
      parser.merge(context, out);
View Full Code Here


    }

    mw.visitInsn(RETURN);
    mw.visitMaxs(0, 0);
    mw.visitEnd();
    cw.visitEnd();
    byte[] code = cw.toByteArray();
    try {
      IParser parser = (IParser) DynamicClassLoader.getClass(name, code)
          .newInstance();
      parser.merge(context, out);
View Full Code Here

        + (variableNames != null ? variableNames.size() : 0), variableNames);

    mw.visitInsn(RETURN);
    mw.visitMaxs(0, 0);
    mw.visitEnd();
    cw.visitEnd();
    byte[] code = cw.toByteArray();
    try {
      return (IParser) DynamicClassLoader.getClass(name, code).newInstance();
    } catch (Exception e) {
      // 出现概率极低
View Full Code Here

        + (variableNames != null ? variableNames.size() : 0), variableNames);

    mw.visitInsn(RETURN);
    mw.visitMaxs(0, 0);
    mw.visitEnd();
    cw.visitEnd();
    byte[] code = cw.toByteArray();
    try {
      return (IParser) DynamicClassLoader.getClass(name, code).newInstance();
    } catch (Exception e) {
      // 出现概率极低
View Full Code Here

        generateIsAbstract(gc);
        generateGetClassProperties(gc);
        generateWriteIntention(gc);
        generateActiveUserCache(gc);
        generateIniSHMethod(gc);
        cv.visitEnd();
       
        try {
            FileOutputStream fos = new FileOutputStream(fileName);
            fos.write(cv.toByteArray());
            fos.close();
View Full Code Here

        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "sun/reflect/MagicAccessorImpl", "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0,0);
        mv.visitEnd();
        cw.visitEnd();

        define(cw.toByteArray(), "sun.reflect.GroovyMagic");
    }

    protected void loadFromRes(String name) throws IOException {
View Full Code Here

        m.aload(0);
        m.invokespecial(p(Handle.class), "<init>", sig(void.class));
        m.voidreturn();
        m.end();

        cv.visitEnd();

        byte[] bytes = ((ClassWriter)cv).toByteArray();

        return bytes;
    }
View Full Code Here

        // finish class initializer
        clazzInit.returnValue();
        clazzInit.endMethod();

        // end class
        cw.visitEnd();

        byte[] data = cw.toByteArray();

        /*
         * try { FileOutputStream o = new
View Full Code Here

        method.start();
        method.aload(1);
        method.athrow();
        method.end();
       
        cw.visitEnd();
       
        byte[] bytecode = cw.toByteArray();
       
        try {
            FileOutputStream fos = new FileOutputStream(classpath);
View Full Code Here

            m.end();
        }


        cw.visitEnd();
        byte[] classBytes = cw.toByteArray();
        dumpReifiedClass(classDumpDir, javaPath, classBytes);
        Class result = parentCL.defineClass(javaName, classBytes);

        try {
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.