Package com.google.gwt.dev.asm

Examples of com.google.gwt.dev.asm.ClassWriter.toByteArray()


    if (Double.parseDouble(System.getProperty("java.class.version")) < Opcodes.V1_6) {
      v = new ForceClassVersion15(v);
    }

    new ClassReader(classBytes).accept(v, 0);
    return writer.toByteArray();
  }

  public byte[] writeJsoIntf(String className) {
    String desc = toDescriptor(className);
    assert (jsoIntfDescs.contains(desc));
View Full Code Here


      interfaces = superDescs.toArray(new String[superDescs.size()]);
    }
    v.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC | Opcodes.ACC_INTERFACE, desc,
        null, "java/lang/Object", interfaces);
    v.visitEnd();
    return writer.toByteArray();
  }
}
View Full Code Here

    }

    v = new RewriteJsniMethods(v);

    new ClassReader(classBytes).accept(v, 0);
    return writer.toByteArray();
  }

  public byte[] writeJsoIntf(String className) {
    String desc = toDescriptor(className);
    assert (jsoIntfDescs.contains(desc));
View Full Code Here

      interfaces = new String[] {superDesc};
    }
    v.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC | Opcodes.ACC_INTERFACE, desc,
        null, "java/lang/Object", interfaces);
    v.visitEnd();
    return writer.toByteArray();
  }
}
View Full Code Here

    if (Double.parseDouble(System.getProperty("java.class.version")) < Opcodes.V1_6) {
      v = new ForceClassVersion15(v);
    }

    new ClassReader(classBytes).accept(v, 0);
    return writer.toByteArray();
  }

  public byte[] writeJsoIntf(String className) {
    String desc = toDescriptor(className);
    assert (jsoIntfDescs.contains(desc));
View Full Code Here

      interfaces = new String[] {superDesc};
    }
    v.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC | Opcodes.ACC_INTERFACE, desc,
        null, "java/lang/Object", interfaces);
    v.visitEnd();
    return writer.toByteArray();
  }
}
View Full Code Here

         v = new ForceClassVersion15(v);
      }

      new ClassReader(classBytes).accept(v, 0);
      classBytesRewriteEvent.end();
      return writer.toByteArray();
   }

   public byte[] writeJsoIntf(String className) {
      String desc = toDescriptor(className);
      assert jsoIntfDescs.contains(desc);
View Full Code Here

         interfaces = superDescs.toArray(new String[superDescs.size()]);
      }
      v.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC | Opcodes.ACC_INTERFACE, desc, null,
               "java/lang/Object", interfaces);
      v.visitEnd();
      return writer.toByteArray();
   }

   private String getBinaryName(JClassType type) {
      String name = type.getPackage().getName() + '.';
      name += type.getName().replace('.', '$');
View Full Code Here

      ClassVisitor cv = writer;
      cv = new ClassProcessor(typeName, cv, state);
      cv = new NativeMethodDefanger(cv);
      visit(logger.setType(state.type), loader, state.type.getInternalName(),
          cv);
      state.contents = new ByteArrayInputStream(writer.toByteArray());
      assert seen.containsKey(state.originalType) : "No type for "
          + state.type.getClassName();
      state.type = seen.get(state.originalType);

      emit(state);
View Full Code Here

      v = new ForceClassVersion15(v);
    }

    new ClassReader(classBytes).accept(v, 0);
    classBytesRewriteEvent.end();
    return writer.toByteArray();
  }

  public byte[] writeJsoIntf(final String className, byte classBytes[]) {
    String desc = toDescriptor(className);
    assert (jsoIntfDescs.contains(desc));
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.