|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.beans.reflect.DefaultReflectionTranscoder
public class DefaultReflectionTranscoder
Default implementation of a reflection transcoder. Determines the correct underlying reflection transcoder by inspecting the class type characteristics.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
DefaultReflectionTranscoder(Type type)
Creates a new default reflection transcoder. |
|
DefaultReflectionTranscoder(Type type,
org.ldaptive.io.ValueTranscoder<?> transcoder)
Creates a new default reflection transcoder. |
|
| Method Summary | |
|---|---|
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. |
protected ReflectionTranscoder |
getCollectionEncoder(Class<?> type,
Type genericType)
Returns the appropriate collection encoder for the supplied type. |
protected Set<SingleValueReflectionTranscoder<?>> |
getDefaultSingleValueTranscoders()
Initializes the set of default single value transcoders. |
protected SingleValueReflectionTranscoder |
getSingleValueReflectionTranscoder(Class<?> type)
Returns the appropriate single value encoder for the supplied type. |
Class<?> |
getType()
Returns the type produced by this transcoder. |
boolean |
supports(Class<?> type)
Returns whether this transcoder can convert object of the supplied type. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public DefaultReflectionTranscoder(Type type)
type - of object to transcode
public DefaultReflectionTranscoder(Type type,
org.ldaptive.io.ValueTranscoder<?> transcoder)
type - of object to transcodetranscoder - custom transcoder for this type| Method Detail |
|---|
protected Set<SingleValueReflectionTranscoder<?>> getDefaultSingleValueTranscoders()
protected SingleValueReflectionTranscoder getSingleValueReflectionTranscoder(Class<?> type)
type - to provide a single value encoder for
protected ReflectionTranscoder getCollectionEncoder(Class<?> type,
Type genericType)
type - to provide a collection encoder forgenericType - of the collection
public Object decodeStringValues(Collection<String> values)
decodeStringValues in interface ReflectionTranscodervalues - to decode
public Object decodeBinaryValues(Collection<byte[]> values)
decodeBinaryValues in interface ReflectionTranscodervalues - to decode
public Collection<String> encodeStringValues(Object values)
encodeStringValues in interface ReflectionTranscodervalues - containing data to encode as strings
public Collection<byte[]> encodeBinaryValues(Object values)
encodeBinaryValues in interface ReflectionTranscodervalues - containing data to encode as byte arrays
public Class<?> getType()
getType in interface ReflectionTranscoderpublic boolean supports(Class<?> type)
supports in interface ReflectionTranscodertype - of object
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||