code: public final static Object toPrimitiveArray(final Object array) {
          if (!array.getClass().isArray()) {
              return array;
          }
          final Class<?> clazz = OBJ_TO_PRIMITIVE.get(array.getClass().getComponentType());
          return setArray(clazz, array);
      }
docs: Convert an array of Objects to primitives if possible. Return input otherwise
  
  @param array
  the array to convert
  @return The array of primitives