T - type of object to transcodepublic class SingleValueReflectionTranscoder<T> extends java.lang.Object implements ReflectionTranscoder
| Modifier and Type | Field and Description |
|---|---|
private ValueTranscoder<T> |
valueTranscoder
Underlying value transcoder.
|
| Constructor and Description |
|---|
SingleValueReflectionTranscoder(ValueTranscoder<T> transcoder)
Creates a new single value reflection transcoder.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
decodeBinaryValues(java.util.Collection<byte[]> values)
Decodes the supplied values into an object.
|
java.lang.Object |
decodeStringValues(java.util.Collection<java.lang.String> values)
Decodes the supplied values into an object.
|
java.util.Collection<byte[]> |
encodeBinaryValues(java.lang.Object value)
Encodes the supplied value into one or more byte arrays for use in an attribute.
|
java.util.Collection<java.lang.String> |
encodeStringValues(java.lang.Object value)
Encodes the supplied value into one or more strings for use in an attribute.
|
java.lang.Class<?> |
getType()
Returns the type produced by this transcoder.
|
static <T> SingleValueReflectionTranscoder<T> |
newInstance(ValueTranscoder<T> transcoder)
Creates a new single value reflection transcoder.
|
boolean |
supports(java.lang.Class<?> type)
Returns whether this transcoder can convert object of the supplied type.
|
java.lang.String |
toString() |
private final ValueTranscoder<T> valueTranscoder
public SingleValueReflectionTranscoder(ValueTranscoder<T> transcoder)
transcoder - for a single valuepublic static <T> SingleValueReflectionTranscoder<T> newInstance(ValueTranscoder<T> transcoder)
T - type to transcodetranscoder - for a single valuepublic java.lang.Object decodeStringValues(java.util.Collection<java.lang.String> values)
ReflectionTranscoderdecodeStringValues in interface ReflectionTranscodervalues - to decodepublic java.lang.Object decodeBinaryValues(java.util.Collection<byte[]> values)
ReflectionTranscoderdecodeBinaryValues in interface ReflectionTranscodervalues - to decodepublic java.util.Collection<java.lang.String> encodeStringValues(java.lang.Object value)
ReflectionTranscoderencodeStringValues in interface ReflectionTranscodervalue - containing data to encode as stringspublic java.util.Collection<byte[]> encodeBinaryValues(java.lang.Object value)
ReflectionTranscoderencodeBinaryValues in interface ReflectionTranscodervalue - containing data to encode as byte arrayspublic java.lang.Class<?> getType()
ReflectionTranscodergetType in interface ReflectionTranscoderpublic boolean supports(java.lang.Class<?> type)
ReflectionTranscodersupports in interface ReflectionTranscodertype - of objectpublic java.lang.String toString()
toString in class java.lang.Object