Package org.ldaptive.beans.reflect
Interface ReflectionTranscoder
-
- All Known Implementing Classes:
AbstractCollectionReflectionTranscoder,ArrayReflectionTranscoder,DefaultReflectionTranscoder,ListReflectionTranscoder,SetReflectionTranscoder,SingleValueReflectionTranscoder
public interface ReflectionTranscoderInterface for reflection based transcoders.
-
-
Method Summary
All Methods Instance Methods Abstract 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 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.booleansupports(Class<?> type)Returns whether this transcoder can convert object of the supplied type.
-
-
-
Method Detail
-
decodeStringValues
Object decodeStringValues(Collection<String> values)
Decodes the supplied values into an object.- Parameters:
values- to decode- Returns:
- object initialized with the values
-
decodeBinaryValues
Object decodeBinaryValues(Collection<byte[]> values)
Decodes the supplied values into an object.- Parameters:
values- to decode- Returns:
- object initialized with the values
-
encodeStringValues
Collection<String> encodeStringValues(Object value)
Encodes the supplied value into one or more strings for use in an attribute.- Parameters:
value- containing data to encode as strings- Returns:
- string attribute values
-
encodeBinaryValues
Collection<byte[]> encodeBinaryValues(Object value)
Encodes the supplied value into one or more byte arrays for use in an attribute.- Parameters:
value- containing data to encode as byte arrays- Returns:
- binary attribute values
-
getType
Class<?> getType()
Returns the type produced by this transcoder.- Returns:
- type produced by this transcoder
-
supports
boolean supports(Class<?> type)
Returns whether this transcoder can convert object of the supplied type.- Parameters:
type- of object- Returns:
- whether the supplied type can be converted
-
-