class CheckCastInstruction extends DexlibAbstractInstruction {

  public CheckCastInstruction(Instruction instruction, int codeAdress) {
    super(instruction, codeAdress);
  }

  @Override
  public void jimplify(DexBody body) {<FILL_FUNCTION_BODY>}

  @Override
  public Set<Type> introducedTypes() {
    ReferenceInstruction i = (ReferenceInstruction) instruction;

    Set<Type> types = new HashSet<Type>();
    types.add(DexType.toSoot((TypeReference) i.getReference()));
    return types;
  }
}

    if (!(instruction instanceof Instruction21c)) {
      throw new IllegalArgumentException("Expected Instruction21c but got: " + instruction.getClass());
    }

    Instruction21c checkCastInstr = (Instruction21c) instruction;

    Local castValue = body.getRegisterLocal(checkCastInstr.getRegisterA());
    Type checkCastType = DexType.toSoot((TypeReference) checkCastInstr.getReference());

    CastExpr castExpr = Jimple.v().newCastExpr(castValue, checkCastType);

    // generate "x = (Type) x"
    // splitter will take care of the rest
    AssignStmt assign = Jimple.v().newAssignStmt(castValue, castExpr);

    setUnit(assign);
    addTags(assign);
    body.add(assign);

    if (IDalvikTyper.ENABLE_DVKTYPER) {
      DalvikTyper.v().setType(assign.getLeftOpBox(), checkCastType, false);
    }

  
<methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineNumber(int) <variables>protected final non-sealed int codeAddress,protected final non-sealed org.jf.dexlib2.iface.instruction.Instruction instruction,protected int lineNumber,protected soot.Unit unit