/** * Generates the instruction to check that the top stack value is of the given type. * * @param type a class or interface type. */ public void checkCast(final Type type) { if (!type.equals(OBJECT_TYPE)) { typeInsn(Opcodes.CHECKCAST, type); } }