public class PojoPropertyAccessorProxySetIndexed extends AbstractPojoPropertyAccessorProxyAdapterComponentType implements PojoPropertyAccessorIndexedOneArg
PojoPropertyAccessorIndexedOneArg
interface for
setting
an indexed property using the getter from
another accessor returning an array or List
.Modifier and Type | Field and Description |
---|---|
private PojoPropertyAccessorOneArg |
containerSetAccessor
The according setter to use if array has to be resized.
|
Constructor and Description |
---|
PojoPropertyAccessorProxySetIndexed(PojoDescriptorDependencies dependencies,
PojoPropertyAccessorNonArg containerGetAccessor,
PojoPropertyAccessorOneArg containerSetAccessor)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
PojoPropertyAccessorIndexedOneArgMode |
getMode()
This method gets the mode of this accessor.
|
Class<?> |
getReturnClass()
This method gets the
Class of the object returned when this accessor is invoked . |
GenericType<?> |
getReturnType()
This method gets the
GenericType of the object returned when this accessor is
invoked . |
Object |
invoke(Object pojoInstance,
int index,
Object item)
This method invokes the according property-method of
pojoInstance with the given arguments. |
getPropertyClass, getPropertyType
getDelegate, getDependencies
getAccessibleObject, getAccessibleObjectName, getDeclaringClass, getModifiers, getName
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAccessibleObject, getAccessibleObjectName, getDeclaringClass, getModifiers, getPropertyClass, getPropertyType
getName
private final PojoPropertyAccessorOneArg containerSetAccessor
public PojoPropertyAccessorProxySetIndexed(PojoDescriptorDependencies dependencies, PojoPropertyAccessorNonArg containerGetAccessor, PojoPropertyAccessorOneArg containerSetAccessor)
dependencies
- are the PojoDescriptorDependencies
to use.containerGetAccessor
- is the accessor delegate that gets an array, or List
property.containerSetAccessor
- is the accessor that sets the array, or List
property. May
be null
if NOT available.public PojoPropertyAccessorIndexedOneArgMode getMode()
getMode
in interface PojoPropertyAccessor
getMode
in interface PojoPropertyAccessorIndexedOneArg
getMode
in class AbstractPojoPropertyAccessorProxy
public GenericType<?> getReturnType()
GenericType
of the object returned when this accessor is
invoked
.getReturnType
in interface PojoPropertyAccessor
getReturnType
in class AbstractPojoPropertyAccessorProxy
Method.getGenericReturnType()
,
Field.getGenericType()
public Class<?> getReturnClass()
Class
of the object returned when this accessor is invoked
. PojoPropertyAccessor.getReturnType()
.getRetrievalClass()
getReturnClass
in interface PojoPropertyAccessor
getReturnClass
in class AbstractPojoPropertyAccessorProxy
Method.getReturnType()
,
Field.getType()
public Object invoke(Object pojoInstance, int index, Object item)
pojoInstance
with the given arguments. invoke
in interface PojoPropertyAccessorIndexedOneArg
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.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).Copyright © 2001–2014 mmm-Team. All rights reserved.