接口的使用
cn.taketoday.core.conversion.Converter
使用Converter的程序包
程序包
说明
Type Conversion System
Default implementation of the type conversion system.
Support classes for Framework's serializer abstraction.
-
cn.taketoday.core.conversion中Converter的使用
修饰符和类型方法说明ConverterFactory.getConverter(Class<T> targetType) Get the converter to convert from S to target type T, where T is also an instance of R.参数类型为Converter的cn.taketoday.core.conversion中的方法修饰符和类型方法说明voidConverterRegistry.addConverter(Converter<?, ?> converter) Add a plain converter to this registry.<S,T> void ConverterRegistry.addConverter(Class<S> sourceType, Class<T> targetType, Converter<? super S, ? extends T> converter) Add a plain converter to this registry.参数类型为Converter的cn.taketoday.core.conversion中的构造器限定符构造器说明ConvertingComparator(Converter<S, T> converter) Create a newConvertingComparatorinstance.ConvertingComparator(Comparator<T> comparator, Converter<S, T> converter) Create a newConvertingComparatorinstance. -
cn.taketoday.core.conversion.support中Converter的使用
修饰符和类型类说明private static final recordCharacterToNumberFactory.CharacterToNumber<T extends Number>(专用程序包) final classCallsEnum.ordinal()to convert a source Enum to a Integer.(专用程序包) final classCallsEnum.name()to convert a source Enum to a String.private static final recordIntegerToEnumConverterFactory.IntegerToEnum<T extends Enum>(专用程序包) final classConverts from any JDK-standard Number implementation to a Character.private static final record(专用程序包) final classSimply callsObject.toString()to convert a source Object to a String.(专用程序包) final classConverts from a Properties to a String by callingProperties.store(java.io.OutputStream, String).(专用程序包) final classConverts String to a Boolean.(专用程序包) final classConverts a String to a Character.(专用程序包) classConvert a String to aCharset.(专用程序包) classConvert a String to aCurrency.private static final recordStringToEnumConverterFactory.StringToEnum<T extends Enum>(专用程序包) final classConverts from a String to aLocale.private static final record(专用程序包) final classConverts from a String to aPattern.(专用程序包) final classConverts a String to a Properties by calling Properties#load(java.io.InputStream).(专用程序包) classConvert a String to aTimeZone.(专用程序包) final classConverts from a String to aUUID.(专用程序包) final classSimple converter from Java 8'sZonedDateTimetoCalendar.(专用程序包) final class修饰符和类型方法说明CharacterToNumberFactory.getConverter(Class<T> targetType) IntegerToEnumConverterFactory.getConverter(Class<T> targetType) NumberToNumberConverterFactory.getConverter(Class<T> targetType) StringToEnumConverterFactory.getConverter(Class<T> targetType) StringToNumberConverterFactory.getConverter(Class<T> targetType) 修饰符和类型方法说明voidGenericConversionService.addConverter(Converter<?, ?> converter) <S,T> void GenericConversionService.addConverter(Class<S> sourceType, Class<T> targetType, Converter<? super S, ? extends T> converter) 限定符构造器说明ConverterAdapter(Converter<?, ?> converter, ResolvableType sourceType, ResolvableType targetType) -
cn.taketoday.core.serializer.support中Converter的使用
修饰符和类型类说明classAConverterthat delegates to aDeserializerto convert data in a byte array to an object.classAConverterthat delegates to aSerializerto convert an object to a byte array.