src/main/java/ognl/OgnlOps.java
public static BigInteger bigIntValue(Object value)
        throws NumberFormatException
    {
        if (value == null) return BigInteger.valueOf(0L);
        Class c = value.getClass();
        if (c == BigInteger.class) return (BigInteger) value;
        if (c == BigDecimal.class) return ((BigDecimal) value).toBigInteger();
        if (c.getSuperclass() == Number.class) return BigInteger.valueOf(((Number) value).longValue());
        if (c == Boolean.class) return BigInteger.valueOf(((Boolean) value).booleanValue() ? 1 : 0);
        if (c == Character.class) return BigInteger.valueOf(((Character) value).charValue());
        return new BigInteger(stringValue(value, true));
    }
public static BigInteger bigIntValue(Object value)
        throws NumberFormatException
    {
        if (value == null) return BigInteger.valueOf(0L);
        Class c = value.getClass();
        if (c == BigInteger.class) return (BigInteger) value;
        if (c == BigDecimal.class) return ((BigDecimal) value).toBigInteger();
        if (c.getSuperclass() == Number.class) return BigInteger.valueOf(((Number) value).longValue());
        if (c == Boolean.class) return BigInteger.valueOf(((Boolean) value).booleanValue() ? 1 : 0);
        if (c == Character.class) return BigInteger.valueOf(((Character) value).charValue());
        return new BigInteger(stringValue(value, true));
    }
public static BigInteger bigIntValue ( Object value ) throws NumberFormatException { if ( value == null ) return BigInteger . valueOf ( 0L ) ; Class c = value . getClass ( ) ; if ( c == BigInteger . class ) return ( BigInteger ) value ; if ( c == BigDecimal . class ) return ( ( BigDecimal ) value ) . toBigInteger ( ) ; if ( c . getSuperclass ( ) == Number . class ) return BigInteger . valueOf ( ( ( Number ) value ) . longValue ( ) ) ; if ( c == Boolean . class ) return BigInteger . valueOf ( ( ( Boolean ) value ) . booleanValue ( ) ? 1 : 0 ) ; if ( c == Character . class ) return BigInteger . valueOf ( ( ( Character ) value ) . charValue ( ) ) ; return new BigInteger ( stringValue ( value , true ) ) ; }
Evaluates the given object as a BigInteger.

@param value
an object to interpret as a BigInteger
@return the BigInteger value implied by the given object
@throws NumberFormatException
if the given object can't be understood as a BigInteger
Evaluates the given object as a BigInteger .