public class MethodAttributeValueMutator extends AbstractAttributeValueMutator
Method of an object.| Modifier and Type | Field and Description |
|---|---|
private java.lang.reflect.Method |
getterMethod
Method to get data from.
|
private java.lang.reflect.Method |
setterMethod
Method to set data on.
|
logger| Constructor and Description |
|---|
MethodAttributeValueMutator(ReflectionTranscoder transcoder,
java.lang.reflect.Method getter,
java.lang.reflect.Method setter)
Creates a new method attribute value mutator.
|
MethodAttributeValueMutator(java.lang.String name,
boolean binary,
SortBehavior sortBehavior,
ReflectionTranscoder transcoder,
java.lang.reflect.Method getter,
java.lang.reflect.Method setter)
Creates a new method attribute value mutator.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<byte[]> |
getBinaryValues(java.lang.Object object)
Returns the binary values of the attribute.
|
java.util.Collection<java.lang.String> |
getStringValues(java.lang.Object object)
Returns the string values of the attribute.
|
void |
setBinaryValues(java.lang.Object object,
java.util.Collection<byte[]> values)
Sets the binary values of the attribute.
|
void |
setStringValues(java.lang.Object object,
java.util.Collection<java.lang.String> values)
Sets the string values of the attribute.
|
java.lang.String |
toString() |
getName, getReflectionTranscoder, getSortBehavior, isBinaryprivate final java.lang.reflect.Method getterMethod
private final java.lang.reflect.Method setterMethod
public MethodAttributeValueMutator(ReflectionTranscoder transcoder, java.lang.reflect.Method getter, java.lang.reflect.Method setter)
transcoder - for mutating the methodsgetter - method to read datasetter - method to write datapublic MethodAttributeValueMutator(java.lang.String name,
boolean binary,
SortBehavior sortBehavior,
ReflectionTranscoder transcoder,
java.lang.reflect.Method getter,
java.lang.reflect.Method setter)
name - of the attributebinary - whether the attribute is binarysortBehavior - sort behavior of the attributetranscoder - to mutate the methodsgetter - method to read datasetter - method to write datapublic java.util.Collection<java.lang.String> getStringValues(java.lang.Object object)
AttributeValueMutatorobject - containing attribute valuespublic java.util.Collection<byte[]> getBinaryValues(java.lang.Object object)
AttributeValueMutatorobject - containing attribute valuespublic void setStringValues(java.lang.Object object,
java.util.Collection<java.lang.String> values)
AttributeValueMutatorobject - to set values onvalues - to setpublic void setBinaryValues(java.lang.Object object,
java.util.Collection<byte[]> values)
AttributeValueMutatorobject - to set values onvalues - to setpublic java.lang.String toString()
toString in class java.lang.Object