public class PojoPropertyAccessorProxySetByIndex extends AbstractPojoPropertyAccessorProxy implements PojoPropertyAccessorOneArg
PojoPropertyAccessorOneArg
acting as as a
setter
that delegates
to a
indexed-setter
using a fixed index.Modifier and Type | Field and Description |
---|---|
private PojoPropertyAccessorIndexedOneArg |
delegate |
private int |
index |
Constructor and Description |
---|
PojoPropertyAccessorProxySetByIndex(PojoPropertyAccessorIndexedOneArg delegate,
int index)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected PojoPropertyAccessorIndexedOneArg |
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, getReturnType
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAccessibleObject, getAccessibleObjectName, getDeclaringClass, getModifiers, getPropertyClass, getPropertyType, getReturnClass, getReturnType
getName
private final PojoPropertyAccessorIndexedOneArg delegate
private final int index
invoke(Object, Object)
public PojoPropertyAccessorProxySetByIndex(PojoPropertyAccessorIndexedOneArg delegate, int index)
delegate
- is the delegate
.index
- is the index to use.public PojoPropertyAccessorOneArgMode getMode()
PojoPropertyAccessor
getMode
in interface PojoPropertyAccessor
getMode
in interface PojoPropertyAccessorOneArg
getMode
in class AbstractPojoPropertyAccessorProxy
protected PojoPropertyAccessorIndexedOneArg getDelegate()
AbstractPojoPropertyAccessorProxy
accessor
this proxy delegates to.getDelegate
in class AbstractPojoPropertyAccessorProxy
public Object invoke(Object pojoInstance, Object argument) throws ReflectionException
PojoPropertyAccessorOneArg
pojoInstance
with the given arguments. invoke
in interface PojoPropertyAccessorOneArg
pojoInstance
- 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.