Top Description Fields Constructors Methods
org.springframework.core.convert.support

pack-priv abstract Class AbstractConditionalEnumConverter

extends Object
implements ConditionalConverter
Class Inheritance
All Implemented Interfaces
org.springframework.core.convert.converter.ConditionalConverter
Known Direct Subclasses
org.springframework.core.convert.support.EnumToIntegerConverter, org.springframework.core.convert.support.EnumToStringConverter
Imports
org.springframework.core.convert.ConversionService, .TypeDescriptor, org.springframework.core.convert.converter.ConditionalConverter, org.springframework.util.ClassUtils

A ConditionalConverter base implementation for enum-based converters.
Author
Stephane Nicoll
Since
4.3

Field Summary

Modifier and TypeField and Description
private final ConversionService

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public boolean
matches(TypeDescriptor
the type descriptor of the field we are converting from
sourceType
,
TypeDescriptor
the type descriptor of the field we are converting to
targetType
)

Implements org.springframework.core.convert.converter.ConditionalConverter.matches.

Should the conversion from sourceType to targetType currently under consideration be selected?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

conversionServiceback to summary
private final ConversionService conversionService

Constructor Detail

AbstractConditionalEnumConverterback to summary
protected AbstractConditionalEnumConverter(ConversionService conversionService)

Method Detail

matchesback to summary
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType)

Implements org.springframework.core.convert.converter.ConditionalConverter.matches.

Doc from org.springframework.core.convert.converter.ConditionalConverter.matches.

Should the conversion from sourceType to targetType currently under consideration be selected?

Parameters
sourceType:TypeDescriptor

the type descriptor of the field we are converting from

targetType:TypeDescriptor

the type descriptor of the field we are converting to

Returns:boolean

true if conversion should be performed, false otherwise

Annotations
@Override