Class AbstractConverter
java.lang.Object
com.norconex.commons.lang.convert.AbstractConverter
- All Implemented Interfaces:
Converter
- Direct Known Subclasses:
BooleanConverter,CharacterConverter,CharsetConverter,ClassConverter,ContentTypeConverter,DateConverter,DimensionConverter,DurationConverter,EnumConverter,FileConverter,InstantConverter,LocalDateTimeConverter,LocaleConverter,NumberConverter,PathConverter,PatternConverter,StringConverter,UrlConverter,ZonedDateTimeConverter,ZoneIdConverter
Adds default behaviors common to most converters, including
checking for null values and wrapping exceptions
in ConverterException.
- Since:
- 2.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleaninthashCode()protected abstract StringnullSafeToString(Object object) protected abstract <T> TnullSafeToType(String value, Class<T> type) toString()final Stringprotected ConverterExceptiontoStringException(Object object) protected ConverterExceptiontoStringException(Object object, Throwable e) final <T> Tprotected ConverterExceptiontoTypeException(String value, Class<?> type) protected ConverterExceptiontoTypeException(String value, Class<?> type, Throwable e) protected ConverterException
-
Constructor Details
-
AbstractConverter
public AbstractConverter()
-
-
Method Details