@SuppressWarnings("unchecked")
	public <C extends Collection<T>, T> C convertToCollection(final Object value, final Class<? extends Collection> destinationType, final Class<T> componentType) {
		if (value == null) {
			return null;
		}

		// check same instances
		if (ClassUtil.isInstanceOf(value, destinationType)) {
			return (C) value;
		}

		final CollectionConverter collectionConverter;

		if (componentType == null) {
			collectionConverter = new CollectionConverter(destinationType, Object.class);
		}
		else {
			collectionConverter = new CollectionConverter(destinationType, componentType);
		}

		return (C) collectionConverter.convert(value);
	}
@SuppressWarnings("unchecked")
	public <C extends Collection<T>, T> C convertToCollection(final Object value, final Class<? extends Collection> destinationType, final Class<T> componentType) {
		if (value == null) {
			return null;
		}

		
		if (ClassUtil.isInstanceOf(value, destinationType)) {
			return (C) value;
		}

		final CollectionConverter collectionConverter;

		if (componentType == null) {
			collectionConverter = new CollectionConverter(destinationType, Object.class);
		}
		else {
			collectionConverter = new CollectionConverter(destinationType, componentType);
		}

		return (C) collectionConverter.convert(value);
	}
@ SuppressWarnings ( "unchecked" ) public < C extends Collection < T > , T > C convertToCollection ( final Object value , final Class < ? extends Collection > destinationType , final Class < T > componentType ) { if ( value == null ) { return null ; } // check same instances if ( ClassUtil . isInstanceOf ( value , destinationType ) ) { return ( C ) value ; } final CollectionConverter collectionConverter ; if ( componentType == null ) { collectionConverter = new CollectionConverter ( destinationType , Object . class ) ; } else { collectionConverter = new CollectionConverter ( destinationType , componentType ) ; } return ( C ) collectionConverter . convert ( value ) ; }
Special case of {@link #convertType(Object, Class)} when target is collection and
when component type is known.
Special case of {