Class MethodAttributeValueMutator

java.lang.Object
org.ldaptive.beans.reflect.AbstractAttributeValueMutator
org.ldaptive.beans.reflect.MethodAttributeValueMutator
All Implemented Interfaces:
AttributeValueMutator

public class MethodAttributeValueMutator extends AbstractAttributeValueMutator
Attribute mutator associated with the Method of an object.
  • Field Details

    • getterMethod

      private final Method getterMethod
      Method to get data from.
    • setterMethod

      private final Method setterMethod
      Method to set data on.
  • Constructor Details

    • MethodAttributeValueMutator

      public MethodAttributeValueMutator(ReflectionTranscoder transcoder, Method getter, Method setter)
      Creates a new method attribute value mutator.
      Parameters:
      transcoder - for mutating the methods
      getter - method to read data
      setter - 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 attribute
      binary - whether the attribute is binary
      transcoder - to mutate the methods
      getter - method to read data
      setter - method to write data
  • Method Details

    • getStringValues

      public Collection<String> getStringValues(Object object)
      Description copied from interface: AttributeValueMutator
      Returns the string values of the attribute.
      Parameters:
      object - containing attribute values
      Returns:
      attribute values
    • getBinaryValues

      public Collection<byte[]> getBinaryValues(Object object)
      Description copied from interface: AttributeValueMutator
      Returns the binary values of the attribute.
      Parameters:
      object - containing attribute values
      Returns:
      attribute values
    • setStringValues

      public void setStringValues(Object object, Collection<String> values)
      Description copied from interface: AttributeValueMutator
      Sets the string values of the attribute.
      Parameters:
      object - to set values on
      values - to set
    • setBinaryValues

      public void setBinaryValues(Object object, Collection<byte[]> values)
      Description copied from interface: AttributeValueMutator
      Sets the binary values of the attribute.
      Parameters:
      object - to set values on
      values - to set
    • toString

      public String toString()
      Overrides:
      toString in class Object