Package org.ldaptive.beans.reflect
Class MethodAttributeValueMutator
java.lang.Object
org.ldaptive.beans.reflect.AbstractAttributeValueMutator
org.ldaptive.beans.reflect.MethodAttributeValueMutator
- All Implemented Interfaces:
AttributeValueMutator
Attribute mutator associated with the
Method
of an object.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Method
Method to get data from.private final Method
Method to set data on.Fields inherited from class org.ldaptive.beans.reflect.AbstractAttributeValueMutator
logger
-
Constructor Summary
ConstructorsConstructorDescriptionMethodAttributeValueMutator
(String name, boolean binary, ReflectionTranscoder transcoder, Method getter, Method setter) Creates a new method attribute value mutator.MethodAttributeValueMutator
(ReflectionTranscoder transcoder, Method getter, Method setter) Creates a new method attribute value mutator. -
Method Summary
Modifier and TypeMethodDescriptionCollection<byte[]>
getBinaryValues
(Object object) Returns the binary values of the attribute.getStringValues
(Object object) Returns the string values of the attribute.void
setBinaryValues
(Object object, Collection<byte[]> values) Sets the binary values of the attribute.void
setStringValues
(Object object, Collection<String> values) Sets the string values of the attribute.toString()
Methods inherited from class org.ldaptive.beans.reflect.AbstractAttributeValueMutator
getName, getReflectionTranscoder, isBinary
-
Field Details
-
getterMethod
Method to get data from. -
setterMethod
Method to set data on.
-
-
Constructor Details
-
MethodAttributeValueMutator
Creates a new method attribute value mutator.- Parameters:
transcoder
- for mutating the methodsgetter
- method to read datasetter
- method to write data
-
MethodAttributeValueMutator
public MethodAttributeValueMutator(String name, boolean binary, ReflectionTranscoder transcoder, Method getter, Method setter) Creates a new method attribute value mutator.- Parameters:
name
- of the attributebinary
- whether the attribute is binarytranscoder
- to mutate the methodsgetter
- method to read datasetter
- method to write data
-
-
Method Details
-
getStringValues
Description copied from interface:AttributeValueMutator
Returns the string values of the attribute.- Parameters:
object
- containing attribute values- Returns:
- attribute values
-
getBinaryValues
Description copied from interface:AttributeValueMutator
Returns the binary values of the attribute.- Parameters:
object
- containing attribute values- Returns:
- attribute values
-
setStringValues
Description copied from interface:AttributeValueMutator
Sets the string values of the attribute.- Parameters:
object
- to set values onvalues
- to set
-
setBinaryValues
Description copied from interface:AttributeValueMutator
Sets the binary values of the attribute.- Parameters:
object
- to set values onvalues
- to set
-
toString
-