public abstract class TypeConverterSupport extends PropertyEditorRegistrySupport implements TypeConverter
TypeConverter
インターフェースの基本実装。主に BeanWrapperImpl
の基本クラスとして機能します。SimpleTypeConverter
コンストラクターと説明 |
---|
TypeConverterSupport() |
修飾子と型 | メソッドと説明 |
---|---|
<T> T | convertIfNecessary(ObjectSE value, ClassSE<T> requiredType) 値を必要な型に変換します(必要に応じて、String から)。 |
<T> T | convertIfNecessary(ObjectSE value, ClassSE<T> requiredType, FieldSE field) 値を必要な型に変換します(必要に応じて、String から)。 |
<T> T | convertIfNecessary(ObjectSE value, ClassSE<T> requiredType, MethodParameter methodParam) 値を必要な型に変換します(必要に応じて、String から)。 |
<T> T | convertIfNecessary(ObjectSE value, ClassSE<T> requiredType, TypeDescriptor typeDescriptor) 値を必要な型に変換します(必要に応じて、String から)。 |
copyCustomEditorsTo, copyDefaultEditorsTo, findCustomEditor, getConversionService, getDefaultEditor, getPropertyType, guessPropertyTypeFromEditors, hasCustomEditorForElement, overrideDefaultEditor, registerCustomEditor, registerCustomEditor, registerDefaultEditors, setConversionService, useConfigValueEditors
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
@Nullable public <T> T convertIfNecessary(@Nullable ObjectSE value, @Nullable ClassSE<T> requiredType) throws TypeMismatchException
TypeConverter
String から任意の型への変換では、通常、PropertyEditor クラスの setAsText
メソッド、または ConversionService の Spring コンバーターを使用します。
TypeConverter
の convertIfNecessary
value
- 変換する値 requiredType
- 変換する必要がある型 (または null
(不明な場合、たとえばコレクション要素の場合))TypeMismatchException
- 型変換が失敗した場合 PropertyEditor.setAsText(String)
SE, PropertyEditor.getValue()
SE, ConversionService
, Converter
@Nullable public <T> T convertIfNecessary(@Nullable ObjectSE value, @Nullable ClassSE<T> requiredType, @Nullable MethodParameter methodParam) throws TypeMismatchException
TypeConverter
String から任意の型への変換では、通常、PropertyEditor クラスの setAsText
メソッド、または ConversionService の Spring コンバーターを使用します。
TypeConverter
の convertIfNecessary
value
- 変換する値 requiredType
- 変換する必要がある型 (または null
(不明な場合、たとえばコレクション要素の場合))methodParam
- 変換のターゲットであるメソッドパラメーター (ジェネリクス型の分析用。null
の場合があります)TypeMismatchException
- 型変換が失敗した場合 PropertyEditor.setAsText(String)
SE, PropertyEditor.getValue()
SE, ConversionService
, Converter
@Nullable public <T> T convertIfNecessary(@Nullable ObjectSE value, @Nullable ClassSE<T> requiredType, @Nullable FieldSE field) throws TypeMismatchException
TypeConverter
String から任意の型への変換では、通常、PropertyEditor クラスの setAsText
メソッド、または ConversionService の Spring コンバーターを使用します。
TypeConverter
の convertIfNecessary
value
- 変換する値 requiredType
- 変換する必要がある型 (または null
(不明な場合、たとえばコレクション要素の場合))field
- 変換のターゲットである反射フィールド (ジェネリクス型の分析用。null
の場合があります)TypeMismatchException
- 型変換が失敗した場合 PropertyEditor.setAsText(String)
SE, PropertyEditor.getValue()
SE, ConversionService
, Converter
@Nullable public <T> T convertIfNecessary(@Nullable ObjectSE value, @Nullable ClassSE<T> requiredType, @Nullable TypeDescriptor typeDescriptor) throws TypeMismatchException
TypeConverter
String から任意の型への変換では、通常、PropertyEditor クラスの setAsText
メソッド、または ConversionService の Spring コンバーターを使用します。
TypeConverter
の convertIfNecessary
value
- 変換する値 requiredType
- 変換する必要がある型 (または null
(不明な場合、たとえばコレクション要素の場合))typeDescriptor
- 使用する型記述子(null
の場合があります)TypeMismatchException
- 型変換が失敗した場合 PropertyEditor.setAsText(String)
SE, PropertyEditor.getValue()
SE, ConversionService
, Converter