code: public static Object coerce(Object pValue,
                                  Class pClass,
                                  Logger pLogger)
              throws ELException {
          if (pClass == String.class) {
              return coerceToString(pValue, pLogger);
          } else if (isPrimitiveNumberClass(pClass)) {
              return coerceToPrimitiveNumber(pValue, pClass, pLogger);
          } else if (pClass == Character.class ||
                  pClass == Character.TYPE) {
              return coerceToCharacter(pValue, pLogger);
          } else if (pClass == Boolean.class ||
                  pClass == Boolean.TYPE) {
              return coerceToBoolean(pValue, pLogger);
          } else {
              return coerceToObject(pValue, pClass, pLogger);
          }
      }
docs: Coerces the given value to the specified class.