public class PojoPropertyAccessorProxySetByKey extends AbstractPojoPropertyAccessorProxy implements PojoPropertyAccessorOneArg
PojoPropertyAccessorOneArg acting as as a
setter that delegates to a
mapped-setter using a
fixed key.| Modifier and Type | Field and Description |
|---|---|
private PojoPropertyAccessorTwoArg |
delegate |
private Object |
key |
| Constructor and Description |
|---|
PojoPropertyAccessorProxySetByKey(PojoPropertyAccessorTwoArg delegate,
Object key)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected PojoPropertyAccessorTwoArg |
getDelegate()
This method gets the
accessor this proxy delegates to. |
PojoPropertyAccessorOneArgMode |
getMode()
This method gets the mode of this accessor.
|
Object |
invoke(Object pojoInstance,
Object argument)
This method invokes the according property-method of
pojoInstance with the given arguments. |
getAccessibleObject, getAccessibleObjectName, getDeclaringClass, getModifiers, getName, getPropertyClass, getPropertyType, getReturnClass, getReturnTypetoStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAccessibleObject, getAccessibleObjectName, getDeclaringClass, getModifiers, getPropertyClass, getPropertyType, getReturnClass, getReturnTypegetNameprivate final PojoPropertyAccessorTwoArg delegate
private final Object key
invoke(Object, Object)public PojoPropertyAccessorProxySetByKey(PojoPropertyAccessorTwoArg delegate, Object key)
delegate - is the delegate.key - is the mapped key to use.public PojoPropertyAccessorOneArgMode getMode()
PojoPropertyAccessorgetMode in interface PojoPropertyAccessorgetMode in interface PojoPropertyAccessorOneArggetMode in class AbstractPojoPropertyAccessorProxyprotected PojoPropertyAccessorTwoArg getDelegate()
AbstractPojoPropertyAccessorProxyaccessor this proxy delegates to.getDelegate in class AbstractPojoPropertyAccessorProxypublic Object invoke(Object pojoInstance, Object argument) throws ReflectionException
PojoPropertyAccessorOneArgpojoInstance with the given arguments. invoke in interface PojoPropertyAccessorOneArgpojoInstance - is the instance of the POJO where to access the property. Has to be an instance of the
type from where this accessor was
created for.argument - is the value of the property to set.null if void (e.g. regular setter method).ReflectionException - if the underlying accessor caused an
error during reflection.Copyright © 2001–2016 mmm-Team. All rights reserved.