private void visitConstantClass(Class<?> clazz) {
    if (clazz == null) clazz = Object.class;
    if (clazz.isPrimitive()) {
        mv.visitFieldInsn(GETSTATIC, toNonPrimitiveType(clazz).getName().replace(".", "/"), "TYPE", "Ljava/lang/Class;");
    } else {
        mv.visitLdcInsn(org.mvel2.asm.Type.getType(clazz));
    }
  }