public class PojoPropertyAccessorIndexedOneArgMethod extends AbstractPojoPropertyAccessorMethod implements PojoPropertyAccessorIndexedOneArg
PojoPropertyAccessorIndexedOneArg interface for accessing a Method.| Modifier and Type | Field and Description |
|---|---|
private boolean |
inverted
false if index is first argument, true if second. |
private PojoPropertyAccessorIndexedOneArgMode |
mode |
| Constructor and Description |
|---|
PojoPropertyAccessorIndexedOneArgMethod(String propertyName,
Type propertyType,
PojoPropertyAccessorIndexedOneArgMode mode,
PojoDescriptor<?> descriptor,
PojoDescriptorDependencies dependencies,
Method method,
boolean inverted)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PojoPropertyAccessorIndexedOneArgMode |
getMode()
This method gets the mode of this accessor.
|
Object |
invoke(Object pojoInstance,
int index,
Object item)
This method invokes the according property-method of
pojoInstance with the given arguments. |
getAccessibleObject, getAccessibleObjectName, getDeclaringClass, getMethod, getModifiers, getReturnClass, getReturnTypegetName, getPropertyTypegetPropertyClass, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAccessibleObject, getAccessibleObjectName, getDeclaringClass, getModifiers, getPropertyClass, getPropertyType, getReturnClass, getReturnTypegetNameprivate final PojoPropertyAccessorIndexedOneArgMode mode
private final boolean inverted
false if index is first argument, true if second.public PojoPropertyAccessorIndexedOneArgMethod(String propertyName, Type propertyType, PojoPropertyAccessorIndexedOneArgMode mode, PojoDescriptor<?> descriptor, PojoDescriptorDependencies dependencies, Method method, boolean inverted)
propertyName - is the name of the property.propertyType - is the generic type of the property.mode - is the mode of access.descriptor - is the descriptor this accessor is intended for.dependencies - are the PojoDescriptorDependencies to use.method - is the method to access.inverted - - false if the index is first method-argument, true if it is the second
argument.public Object invoke(Object pojoInstance, int index, Object item)
PojoPropertyAccessorIndexedOneArgpojoInstance with the given arguments. invoke in interface PojoPropertyAccessorIndexedOneArgpojoInstance - 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.index - is the position in the indexed property where to apply (e.g. set or insert) the given item.item - is the value to apply (e.g. set or insert) as element of the indexed property.null if void (e.g. regular setter method).public PojoPropertyAccessorIndexedOneArgMode getMode()
PojoPropertyAccessorgetMode in interface PojoPropertyAccessorgetMode in interface PojoPropertyAccessorIndexedOneArgCopyright © 2001–2016 mmm-Team. All rights reserved.