This commit is contained in:
Keith Donald 2009-09-17 21:32:31 +00:00
parent 563ef683f9
commit d29a894d57
1 changed files with 13 additions and 7 deletions

View File

@ -16,21 +16,27 @@
package org.springframework.core.convert.support; package org.springframework.core.convert.support;
import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.converter.ConverterFactory;
/** /**
* Uniform Converter interface used by GenericConversionService. * Uniform Converter interface used by GenericConversionService.
* This interface is an internal detail of the GenericConversionService implementation. * This interface is an internal detail of the GenericConversionService implementation.
* It should generally not be implemented directly. * It should generally not be implemented by application code directly.
* See {@link Converter} and {@link ConverterFactory} interfaces for public converter SPIs.
* @author Keith Donald * @author Keith Donald
* @since 3.0
* @see Converter
* @see ConverterFactory
*/ */
public interface GenericConverter { public interface GenericConverter {
/** /**
* Convert the source object to the target type requested. * Convert the source to the targetType described by the TypeDescriptor.
* @param source the source * @param source the source object to convert (never null)
* @param type the target type descriptor * @param targetType the target type to convert to
* @return the converted object * @return the converted object
*/ */
Object convert(Object source, TypeDescriptor type); Object convert(Object source, TypeDescriptor targetType);
} }