static Number coerceToPrimitiveNumber ( long pValue , Class pClass ) throws ELException { if ( pClass == Byte . class || pClass == Byte . TYPE ) { return PrimitiveObjects . getByte ( ( byte ) pValue ) ; } else if ( pClass == Short . class || pClass == Short . TYPE ) { return PrimitiveObjects . getShort ( ( short ) pValue ) ; } else if ( pClass == Integer . class || pClass == Integer . TYPE ) { return PrimitiveObjects . getInteger ( ( int ) pValue ) ; } else if ( pClass == Long . class || pClass == Long . TYPE ) { return PrimitiveObjects . getLong ( ( long ) pValue ) ; } else if ( pClass == Float . class || pClass == Float . TYPE ) { return PrimitiveObjects . getFloat ( ( float ) pValue ) ; } else if ( pClass == Double . class || pClass == Double . TYPE ) { return PrimitiveObjects . getDouble ( ( double ) pValue ) ; } else { return PrimitiveObjects . getInteger ( 0 ) ; } }
Coerces a long to the given primitive number class