net.sf.mmm.util.pojo.descriptor.impl.accessor
Class PojoPropertyAccessorIndexedNonArgMethod
java.lang.Object
net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessor
net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorBase
net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorMethod
net.sf.mmm.util.pojo.descriptor.impl.accessor.PojoPropertyAccessorIndexedNonArgMethod
- All Implemented Interfaces:
- PojoPropertyAccessor, PojoPropertyAccessorIndexedNonArg, PojoAttributeName
public class PojoPropertyAccessorIndexedNonArgMethod
- extends AbstractPojoPropertyAccessorMethod
- implements PojoPropertyAccessorIndexedNonArg
This is the implementation of the PojoPropertyAccessorIndexedNonArg
interface for accessing a Method.
- Since:
- 1.1.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
mode
private final PojoPropertyAccessorIndexedNonArgMode mode
- See Also:
getMode()
PojoPropertyAccessorIndexedNonArgMethod
public PojoPropertyAccessorIndexedNonArgMethod(String propertyName,
Type propertyType,
PojoPropertyAccessorIndexedNonArgMode mode,
PojoDescriptor<?> descriptor,
PojoDescriptorDependencies dependencies,
Method method)
- The constructor.
- Parameters:
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.
invoke
public Object invoke(Object pojoInstance,
int index)
- This method invokes the according property-method of
pojoInstance with the given arguments.
- Specified by:
invoke in interface PojoPropertyAccessorIndexedNonArg
- Parameters:
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 (e.g. where to get or
remove an item).
- Returns:
- the result of the invocation. Will be
null if void
(e.g. remove method).
getMode
public PojoPropertyAccessorIndexedNonArgMode getMode()
- This method gets the mode of this accessor.
- Specified by:
getMode in interface PojoPropertyAccessor- Specified by:
getMode in interface PojoPropertyAccessorIndexedNonArg
- Returns:
- the access mode.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.