public static Value number(IClass type, int val) {
    	ClassHolder holder = type.getClassHolder();
        switch (type.getType().getSort()) {
        case Type.CHAR:
            return value(holder, (char) val);
        case Type.BYTE:
            return value(holder, (byte) val);
        case Type.SHORT:
            return value(holder, (short) val);
        case Type.INT:
            return value(holder, val);
        case Type.FLOAT:
            return value(holder, (float) val);
        case Type.LONG:
            return value(holder, (long) val);
        case Type.DOUBLE:
            return value(holder, (double) val);
        }
        return null;
    }