Package org.ldaptive.beans.reflect
Class ArrayReflectionTranscoder
- java.lang.Object
- 
- org.ldaptive.beans.reflect.ArrayReflectionTranscoder
 
- 
- All Implemented Interfaces:
- ReflectionTranscoder
 
 public class ArrayReflectionTranscoder extends Object implements ReflectionTranscoder Reflection transcoder which expects to operate on collections containing an array of values.
- 
- 
Field SummaryFields Modifier and Type Field Description private Class<?>typeType of array element for this transcoder.private SingleValueReflectionTranscoder<?>valueTranscoderUnderlying value transcoder.
 - 
Constructor SummaryConstructors Constructor Description ArrayReflectionTranscoder(SingleValueReflectionTranscoder<?> transcoder)Creates a new array reflection transcoder.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectdecodeBinaryValues(Collection<byte[]> values)Decodes the supplied values into an object.ObjectdecodeStringValues(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.booleansupports(Class<?> t)Returns whether this transcoder can convert object of the supplied type.StringtoString()
 
- 
- 
- 
Field Detail- 
valueTranscoderprivate final SingleValueReflectionTranscoder<?> valueTranscoder Underlying value transcoder.
 - 
typeprivate final Class<?> type Type of array element for this transcoder.
 
- 
 - 
Constructor Detail- 
ArrayReflectionTranscoderpublic ArrayReflectionTranscoder(SingleValueReflectionTranscoder<?> transcoder) Creates a new array reflection transcoder.- Parameters:
- transcoder- to operate on individual array elements
 
 
- 
 - 
Method Detail- 
decodeStringValuespublic Object decodeStringValues(Collection<String> values) Description copied from interface:ReflectionTranscoderDecodes the supplied values into an object.- Specified by:
- decodeStringValuesin interface- ReflectionTranscoder
- Parameters:
- values- to decode
- Returns:
- object initialized with the values
 
 - 
decodeBinaryValuespublic Object decodeBinaryValues(Collection<byte[]> values) Description copied from interface:ReflectionTranscoderDecodes the supplied values into an object.- Specified by:
- decodeBinaryValuesin interface- ReflectionTranscoder
- Parameters:
- values- to decode
- Returns:
- object initialized with the values
 
 - 
encodeStringValuespublic Collection<String> encodeStringValues(Object values) Description copied from interface:ReflectionTranscoderEncodes the supplied value into one or more strings for use in an attribute.- Specified by:
- encodeStringValuesin interface- ReflectionTranscoder
- Parameters:
- values- containing data to encode as strings
- Returns:
- string attribute values
 
 - 
encodeBinaryValuespublic Collection<byte[]> encodeBinaryValues(Object values) Description copied from interface:ReflectionTranscoderEncodes the supplied value into one or more byte arrays for use in an attribute.- Specified by:
- encodeBinaryValuesin interface- ReflectionTranscoder
- Parameters:
- values- containing data to encode as byte arrays
- Returns:
- binary attribute values
 
 - 
getTypepublic Class<?> getType() Description copied from interface:ReflectionTranscoderReturns the type produced by this transcoder.- Specified by:
- getTypein interface- ReflectionTranscoder
- Returns:
- type produced by this transcoder
 
 - 
supportspublic boolean supports(Class<?> t) Description copied from interface:ReflectionTranscoderReturns whether this transcoder can convert object of the supplied type.- Specified by:
- supportsin interface- ReflectionTranscoder
- Parameters:
- t- of object
- Returns:
- whether the supplied type can be converted
 
 
- 
 
-