public class ArrayReflectionTranscoder extends Object implements ReflectionTranscoder
Modifier and Type | Field and Description |
---|---|
private Class<?> |
type
Type of array element for this transcoder.
|
private SingleValueReflectionTranscoder<?> |
valueTranscoder
Underlying value transcoder.
|
Constructor and Description |
---|
ArrayReflectionTranscoder(SingleValueReflectionTranscoder<?> transcoder)
Creates a new array 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 values)
Encodes the supplied value into one or more byte arrays for use in an attribute.
|
Collection<String> |
encodeStringValues(Object values)
Encodes the supplied value into one or more strings for use in an attribute.
|
Class<?> |
getType()
Returns the type produced by this transcoder.
|
boolean |
supports(Class<?> t)
Returns whether this transcoder can convert object of the supplied type.
|
String |
toString() |
private final SingleValueReflectionTranscoder<?> valueTranscoder
private final Class<?> type
public ArrayReflectionTranscoder(SingleValueReflectionTranscoder<?> transcoder)
transcoder
- to operate on individual array elementspublic Object decodeStringValues(Collection<String> values)
ReflectionTranscoder
decodeStringValues
in interface ReflectionTranscoder
values
- to decodepublic Object decodeBinaryValues(Collection<byte[]> values)
ReflectionTranscoder
decodeBinaryValues
in interface ReflectionTranscoder
values
- to decodepublic Collection<String> encodeStringValues(Object values)
ReflectionTranscoder
encodeStringValues
in interface ReflectionTranscoder
values
- containing data to encode as stringspublic Collection<byte[]> encodeBinaryValues(Object values)
ReflectionTranscoder
encodeBinaryValues
in interface ReflectionTranscoder
values
- containing data to encode as byte arrayspublic Class<?> getType()
ReflectionTranscoder
getType
in interface ReflectionTranscoder
public boolean supports(Class<?> t)
ReflectionTranscoder
supports
in interface ReflectionTranscoder
t
- of objectCopyright © 2003-2019 Virginia Tech. All Rights Reserved.