MethodVisitor (int i, String name, String s1, String s2, String[] strings) { final MethodVisitor mw = super.visitMethod(i, name, s1, s2, strings); if ("<clinit>".equals(name)) { //remove field's static initialization return new MethodAdapter(mw) { @Override public void visitFieldInsn(int opCode, String s, String name, String desc) { if (name.startsWith(timeStampFieldStart) && opCode == Opcodes.PUTSTATIC) { visitInsn(Type.LONG_TYPE.getDescriptor().equals(desc) ? Opcodes.POP2 : Opcodes.POP); } else { super.visitFieldInsn(opCode, s, name, desc); } } }; } return mw; }