private void cast(IClass from, IClass to){
        Instructions instructions = getInstructions();
        if(from.isPrimitive() && to.isPrimitive()){
            instructions.cast(from.getType(), to.getType());
        }else if(from.isPrimitive()){
            instructions.box(from.getType());
        }else if(IClassUtils.isPrimitiveWrapAClass(from) && to.isPrimitive()){
            Type primType = Instructions.getUnBoxedType(from.getType());
            instructions.unbox(from.getType());
            instructions.cast(primType, to.getType());
        }
    }