net.sf.mmm.util.pojo.descriptor.api.accessor
Interface PojoPropertyAccessorNonArg

All Superinterfaces:
PojoAttributeName, PojoPropertyAccessor
All Known Implementing Classes:
PojoPropertyAccessorGetField, PojoPropertyAccessorNonArgMethod, PojoPropertyAccessorProxyGetByIndex, PojoPropertyAccessorProxyGetByKey, PojoPropertyAccessorProxyGetSize

public interface PojoPropertyAccessorNonArg
extends PojoPropertyAccessor

This is the interface for a property-accessor that allows to read a property.

Since:
1.1.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Method Summary
 PojoPropertyAccessorNonArgMode getMode()
          This method gets the mode of this accessor.
 Object invoke(Object pojoInstance)
          This method invokes the according property-method of pojoInstance with the given arguments.
 
Methods inherited from interface net.sf.mmm.util.pojo.descriptor.api.accessor.PojoPropertyAccessor
getAccessibleObject, getDeclaringClass, getModifiers, getPropertyClass, getPropertyType, getReturnClass, getReturnType
 
Methods inherited from interface net.sf.mmm.util.pojo.descriptor.api.attribute.PojoAttributeName
getName
 

Method Detail

getMode

PojoPropertyAccessorNonArgMode getMode()
This method gets the mode of this accessor.

Specified by:
getMode in interface PojoPropertyAccessor
Returns:
the access mode.

invoke

Object invoke(Object pojoInstance)
              throws ReflectionException
This method invokes the according property-method of pojoInstance with the given arguments.

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.
Returns:
the result of the invocation. It will be null if void (e.g. initialize method). For a regular getter this will be the value of the property.
Throws:
ReflectionException - if the underlying accessor caused an error during reflection.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.