net.sf.mmm.util.pojo.descriptor.impl.accessor
Class PojoPropertyAccessorGetField

java.lang.Object
  extended by net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessor
      extended by net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorBase
          extended by net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorField
              extended by net.sf.mmm.util.pojo.descriptor.impl.accessor.PojoPropertyAccessorGetField
All Implemented Interfaces:
PojoPropertyAccessor, PojoPropertyAccessorNonArg, PojoAttributeName

public class PojoPropertyAccessorGetField
extends AbstractPojoPropertyAccessorField
implements PojoPropertyAccessorNonArg

This is the implementation of the PojoPropertyAccessorNonArg interface for getting a Field.

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

Constructor Summary
PojoPropertyAccessorGetField(PojoDescriptor<?> descriptor, PojoDescriptorDependencies dependencies, Field field)
          The constructor.
 
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 class net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorField
getAccessibleObject, getDeclaringClass, getField, getModifiers, getReturnClass, getReturnType
 
Methods inherited from class net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorBase
getName, getPropertyType
 
Methods inherited from class net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessor
getPropertyClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

PojoPropertyAccessorGetField

public PojoPropertyAccessorGetField(PojoDescriptor<?> descriptor,
                                    PojoDescriptorDependencies dependencies,
                                    Field field)
The constructor.

Parameters:
descriptor - is the descriptor this accessor is intended for.
dependencies - are the PojoDescriptorDependencies to use.
field - is the field to access.
Method Detail

invoke

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

Specified by:
invoke in interface PojoPropertyAccessorNonArg
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.

getMode

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

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


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