Package org.ldaptive.beans.reflect
Class ArrayReflectionTranscoder
java.lang.Object
org.ldaptive.beans.reflect.ArrayReflectionTranscoder
- All Implemented Interfaces:
ReflectionTranscoder
Reflection transcoder which expects to operate on collections containing an array of values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<?>Type of array element for this transcoder.private final SingleValueReflectionTranscoder<?>Underlying value transcoder. -
Constructor Summary
ConstructorsConstructorDescriptionArrayReflectionTranscoder(SingleValueReflectionTranscoder<?> transcoder) Creates a new array reflection transcoder. -
Method Summary
Modifier and TypeMethodDescriptiondecodeBinaryValues(Collection<byte[]> values) Decodes the supplied values into an 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.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.booleanReturns whether this transcoder can convert object of the supplied type.toString()
-
Field Details
-
valueTranscoder
Underlying value transcoder. -
type
Type of array element for this transcoder.
-
-
Constructor Details
-
ArrayReflectionTranscoder
Creates a new array reflection transcoder.- Parameters:
transcoder- to operate on individual array elements
-
-
Method Details
-
decodeStringValues
Description copied from interface:ReflectionTranscoderDecodes the supplied values into an object.- Specified by:
decodeStringValuesin interfaceReflectionTranscoder- Parameters:
values- to decode- Returns:
- object initialized with the values
-
decodeBinaryValues
Description copied from interface:ReflectionTranscoderDecodes the supplied values into an object.- Specified by:
decodeBinaryValuesin interfaceReflectionTranscoder- Parameters:
values- to decode- Returns:
- object initialized with the values
-
encodeStringValues
Description copied from interface:ReflectionTranscoderEncodes the supplied value into one or more strings for use in an attribute.- Specified by:
encodeStringValuesin interfaceReflectionTranscoder- Parameters:
values- containing data to encode as strings- Returns:
- string attribute values
-
encodeBinaryValues
Description copied from interface:ReflectionTranscoderEncodes the supplied value into one or more byte arrays for use in an attribute.- Specified by:
encodeBinaryValuesin interfaceReflectionTranscoder- Parameters:
values- containing data to encode as byte arrays- Returns:
- binary attribute values
-
getType
Description copied from interface:ReflectionTranscoderReturns the type produced by this transcoder.- Specified by:
getTypein interfaceReflectionTranscoder- Returns:
- type produced by this transcoder
-
supports
Description copied from interface:ReflectionTranscoderReturns whether this transcoder can convert object of the supplied type.- Specified by:
supportsin interfaceReflectionTranscoder- Parameters:
t- of object- Returns:
- whether the supplied type can be converted
-
toString
-