Uses of Class
org.springframework.core.convert.TypeDescriptor
Packages that use TypeDescriptor
Package
Description
Type conversion system API.
SPI to implement Converters for the type conversion system.
Default implementation of the type conversion system.
-
Uses of TypeDescriptor in org.springframework.core.convert
Methods in org.springframework.core.convert that return TypeDescriptorModifier and TypeMethodDescriptionstatic TypeDescriptorTypeDescriptor.array(TypeDescriptor elementTypeDescriptor) Create a new type descriptor as an array of the specified type.static TypeDescriptorTypeDescriptor.collection(Class<?> collectionType, TypeDescriptor elementTypeDescriptor) Create a new type descriptor from aCollectiontype.TypeDescriptor.elementTypeDescriptor(Object element) If this type is aCollectionor an array, creates an element TypeDescriptor from the provided collection or array element.static TypeDescriptorCreate a new type descriptor for an object.TypeDescriptor.getElementTypeDescriptor()If this type is an array, returns the array's component type.TypeDescriptor.getMapKeyTypeDescriptor()If this type is aMapand its key type is parameterized, returns the map's key type.TypeDescriptor.getMapKeyTypeDescriptor(Object mapKey) If this type is aMap, creates a mapKeyTypeDescriptorfrom the provided map key.TypeDescriptor.getMapValueTypeDescriptor()If this type is aMapand its value type is parameterized, returns the map's value type.TypeDescriptor.getMapValueTypeDescriptor(Object mapValue) If this type is aMap, creates a mapValueTypeDescriptorfrom the provided map value.ConversionFailedException.getSourceType()Return the source type we tried to convert the value from.ConverterNotFoundException.getSourceType()Return the source type that was requested to convert from.ConversionFailedException.getTargetType()Return the target type we tried to convert the value to.ConverterNotFoundException.getTargetType()Return the target type that was requested to convert to.static TypeDescriptorTypeDescriptor.map(Class<?> mapType, TypeDescriptor keyTypeDescriptor, TypeDescriptor valueTypeDescriptor) Create a new type descriptor from aMaptype.Narrows thisTypeDescriptorby setting its type to the class of the provided value.TypeDescriptor.nested(int nestingLevel) Create a type descriptor for a nested type declared within this descriptor.static TypeDescriptorCreate a type descriptor for a nested type declared within the field.static TypeDescriptorCreate a type descriptor for a nested type declared within the property.static TypeDescriptorTypeDescriptor.nested(MethodParameter methodParameter, int nestingLevel) Create a type descriptor for a nested type declared within the method parameter.Cast thisTypeDescriptorto a superclass or implemented interface preserving annotations and nested type context.static TypeDescriptorCreate a new type descriptor from the given type.Methods in org.springframework.core.convert with parameters of type TypeDescriptorModifier and TypeMethodDescriptionstatic TypeDescriptorTypeDescriptor.array(TypeDescriptor elementTypeDescriptor) Create a new type descriptor as an array of the specified type.booleanConversionService.canConvert(TypeDescriptor sourceType, TypeDescriptor targetType) Returntrueif objects ofsourceTypecan be converted to thetargetType.static TypeDescriptorTypeDescriptor.collection(Class<?> collectionType, TypeDescriptor elementTypeDescriptor) Create a new type descriptor from aCollectiontype.default ObjectConversionService.convert(Object source, TypeDescriptor targetType) Convert the givensourceto the specifiedtargetType.ConversionService.convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) Convert the givensourceto the specifiedtargetType.booleanTypeDescriptor.isAssignableTo(TypeDescriptor typeDescriptor) Returns true if an object of this type descriptor can be assigned to the location described by the given type descriptor.static TypeDescriptorTypeDescriptor.map(Class<?> mapType, TypeDescriptor keyTypeDescriptor, TypeDescriptor valueTypeDescriptor) Create a new type descriptor from aMaptype.Constructors in org.springframework.core.convert with parameters of type TypeDescriptorModifierConstructorDescriptionConversionFailedException(TypeDescriptor sourceType, TypeDescriptor targetType, Object value, Throwable cause) Create a new conversion exception.ConverterNotFoundException(TypeDescriptor sourceType, TypeDescriptor targetType) Create a new conversion executor not found exception. -
Uses of TypeDescriptor in org.springframework.core.convert.converter
Methods in org.springframework.core.convert.converter with parameters of type TypeDescriptorModifier and TypeMethodDescriptionGenericConverter.convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) Convert the source object to the targetType described by theTypeDescriptor.booleanConditionalConverter.matches(TypeDescriptor sourceType, TypeDescriptor targetType) Should the conversion fromsourceTypetotargetTypecurrently under consideration be selected? -
Uses of TypeDescriptor in org.springframework.core.convert.support
Methods in org.springframework.core.convert.support with parameters of type TypeDescriptorModifier and TypeMethodDescriptionbooleanGenericConversionService.canBypassConvert(TypeDescriptor sourceType, TypeDescriptor targetType) Return whether conversion between the source type and the target type can be bypassed.booleanGenericConversionService.canConvert(TypeDescriptor sourceType, TypeDescriptor targetType) GenericConversionService.convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) protected ObjectGenericConversionService.convertNullSource(TypeDescriptor sourceType, TypeDescriptor targetType) Template method to convert anullsource.protected GenericConverterGenericConversionService.getConverter(TypeDescriptor sourceType, TypeDescriptor targetType) Hook method to look up the converter for a given sourceType/targetType pair.protected GenericConverterGenericConversionService.getDefaultConverter(TypeDescriptor sourceType, TypeDescriptor targetType) Return the default converter if no converter is found for the given sourceType/targetType pair.Constructors in org.springframework.core.convert.support with parameters of type TypeDescriptorModifierConstructorDescriptionConvertingPropertyEditorAdapter(ConversionService conversionService, TypeDescriptor targetDescriptor) Create a new ConvertingPropertyEditorAdapter for a givenConversionServiceand the given target type.