Package org.ldaptive.beans.reflect
Interface ReflectionTranscoder
- All Known Implementing Classes:
AbstractCollectionReflectionTranscoder
,ArrayReflectionTranscoder
,DefaultReflectionTranscoder
,ListReflectionTranscoder
,SetReflectionTranscoder
,SingleValueReflectionTranscoder
public interface ReflectionTranscoder
Interface for reflection based transcoders.
-
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 value) Encodes the supplied value into one or more byte arrays for use in an attribute.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.boolean
Returns whether this transcoder can convert object of the supplied type.
-
Method Details
-
decodeStringValues
Decodes the supplied values into an object.- Parameters:
values
- to decode- Returns:
- object initialized with the values
-
decodeBinaryValues
Decodes the supplied values into an object.- Parameters:
values
- to decode- Returns:
- object initialized with the values
-
encodeStringValues
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
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
Returns whether this transcoder can convert object of the supplied type.- Parameters:
type
- of object- Returns:
- whether the supplied type can be converted
-