1 package org.mockitoutil; 2 3 import org.objectweb.asm.ClassWriter; 4 5 import static org.objectweb.asm.Opcodes.*; 6 7 public class SimpleClassGenerator { 8 makeMarkerInterface(String qualifiedName)9 public static byte[] makeMarkerInterface(String qualifiedName) { 10 String relativePath = qualifiedName.replace('.', '/'); 11 12 ClassWriter cw = new ClassWriter(0); 13 cw.visit(V1_6, ACC_PUBLIC + ACC_ABSTRACT + ACC_INTERFACE, relativePath, null, "java/lang/Object", null); 14 cw.visitEnd(); 15 16 return cw.toByteArray(); 17 } 18 19 } 20