T - type of object to transcodepublic class SingleValueReflectionTranscoder<T> extends 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 | 
|---|---|
Object | 
decodeBinaryValues(Collection<byte[]> values)
Decodes the supplied values into an object. 
 | 
Object | 
decodeStringValues(Collection<String> values)
Decodes the supplied values into an object. 
 | 
Collection<byte[]> | 
encodeBinaryValues(Object value)
Encodes the supplied value into one or more byte arrays for use in an attribute. 
 | 
Collection<String> | 
encodeStringValues(Object value)
Encodes the supplied value into one or more strings for use in an attribute. 
 | 
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(Class<?> type)
Returns whether this transcoder can convert object of the supplied type. 
 | 
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 Object decodeStringValues(Collection<String> values)
ReflectionTranscoderdecodeStringValues in interface ReflectionTranscodervalues - to decodepublic Object decodeBinaryValues(Collection<byte[]> values)
ReflectionTranscoderdecodeBinaryValues in interface ReflectionTranscodervalues - to decodepublic Collection<String> encodeStringValues(Object value)
ReflectionTranscoderencodeStringValues in interface ReflectionTranscodervalue - containing data to encode as stringspublic Collection<byte[]> encodeBinaryValues(Object value)
ReflectionTranscoderencodeBinaryValues in interface ReflectionTranscodervalue - containing data to encode as byte arrayspublic Class<?> getType()
ReflectionTranscodergetType in interface ReflectionTranscoderpublic boolean supports(Class<?> type)
ReflectionTranscodersupports in interface ReflectionTranscodertype - of objectCopyright © 2003-2019 Virginia Tech. All Rights Reserved.