Package org.ldaptive.beans.reflect
Class TranscoderFactory
java.lang.Object
org.ldaptive.beans.reflect.TranscoderFactory
Creates value transcoders and stores them in a static map.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map
<String, ValueTranscoder<?>> Value transcoders. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ValueTranscoder
<?> createValueTranscoder
(String type) Creates a value transcoder for the supplied type.static ValueTranscoder
<?> getInstance
(String type) Returns a value transcoder for the supplied type.
-
Field Details
-
TRANSCODERS
Value transcoders.
-
-
Constructor Details
-
TranscoderFactory
private TranscoderFactory()Default constructor.
-
-
Method Details
-
getInstance
Returns a value transcoder for the supplied type. If the type cannot be found it is instantiated and cached for future use.- Parameters:
type
- of value transcoder- Returns:
- value transcoder
-
createValueTranscoder
Creates a value transcoder for the supplied type.- Parameters:
type
- to create value transcoder for- Returns:
- value transcoder
- Throws:
IllegalArgumentException
- if the supplied type cannot be instantiated
-