- All Known Implementing Classes:
BooleanArrayStringConverterFactory
,BooleanObjectArrayStringConverterFactory
,ByteObjectArrayStringConverterFactory
,CharObjectArrayStringConverterFactory
,NumericArrayStringConverterFactory
,NumericObjectArrayStringConverterFactory
public interface StringConverterFactory
Factory for
StringConverter
that allows converters to be
created dynamically or easily initialised.
Implementations must be immutable and thread-safe.
- Since:
- 1.5
-
Method Summary
-
Method Details
-
findConverter
Finds a converter by type.If the converter is not found, the implementation should return null. This method should only throw an exception if there is a problem that the developer must be made aware of. For example, the annotation-based factory throws an exception if the annotations are used incorrectly.
- Parameters:
cls
- the type to lookup, not null- Returns:
- the converter, null if not found
- Throws:
RuntimeException
- (or subclass) if there a developer error is found during lookup
-