Package org.ldaptive.beans.reflect
Class FieldAttributeValueMutator
- java.lang.Object
-
- org.ldaptive.beans.reflect.AbstractAttributeValueMutator
-
- org.ldaptive.beans.reflect.FieldAttributeValueMutator
-
- All Implemented Interfaces:
AttributeValueMutator
public class FieldAttributeValueMutator extends AbstractAttributeValueMutator
Attribute mutator associated with theField
of an object.
-
-
Field Summary
Fields Modifier and Type Field Description private Field
f
Field to operate on.private boolean
isFinal
Whether the field has a final modifier.-
Fields inherited from class org.ldaptive.beans.reflect.AbstractAttributeValueMutator
logger
-
-
Constructor Summary
Constructors Constructor Description FieldAttributeValueMutator(String name, boolean binary, ReflectionTranscoder transcoder, Field field)
Creates a new field attribute value mutator.FieldAttributeValueMutator(ReflectionTranscoder transcoder, Field field)
Creates a new field attribute value mutator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<byte[]>
getBinaryValues(Object object)
Returns the binary values of the attribute.Collection<String>
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.String
toString()
-
Methods inherited from class org.ldaptive.beans.reflect.AbstractAttributeValueMutator
getName, getReflectionTranscoder, isBinary
-
-
-
-
Field Detail
-
f
private final Field f
Field to operate on.
-
isFinal
private final boolean isFinal
Whether the field has a final modifier.
-
-
Constructor Detail
-
FieldAttributeValueMutator
public FieldAttributeValueMutator(ReflectionTranscoder transcoder, Field field)
Creates a new field attribute value mutator.- Parameters:
transcoder
- for mutating the fieldfield
- to mutate
-
FieldAttributeValueMutator
public FieldAttributeValueMutator(String name, boolean binary, ReflectionTranscoder transcoder, Field field)
Creates a new field attribute value mutator.- Parameters:
name
- of the attributebinary
- whether the attribute is binarytranscoder
- to mutate the fieldfield
- to mutate
-
-
Method Detail
-
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 onvalues
- 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 onvalues
- to set
-
-