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

All Superinterfaces:
PojoAttributeName
All Known Subinterfaces:
PojoPropertyAccessorIndexedNonArg, PojoPropertyAccessorIndexedOneArg, PojoPropertyAccessorNonArg, PojoPropertyAccessorOneArg, PojoPropertyAccessorTwoArg
All Known Implementing Classes:
AbstractPojoPropertyAccessor, AbstractPojoPropertyAccessorBase, AbstractPojoPropertyAccessorField, AbstractPojoPropertyAccessorMethod, AbstractPojoPropertyAccessorProxy, AbstractPojoPropertyAccessorProxyAdapter, AbstractPojoPropertyAccessorProxyAdapterComponentType, PojoPropertyAccessorGetField, PojoPropertyAccessorIndexedNonArgMethod, PojoPropertyAccessorIndexedOneArgMethod, PojoPropertyAccessorNonArgMethod, PojoPropertyAccessorOneArgMethod, PojoPropertyAccessorProxyAdd, PojoPropertyAccessorProxyGetByIndex, PojoPropertyAccessorProxyGetByKey, PojoPropertyAccessorProxyGetIndexed, PojoPropertyAccessorProxyGetMapped, PojoPropertyAccessorProxyGetSize, PojoPropertyAccessorProxyRemove, PojoPropertyAccessorProxySetByIndex, PojoPropertyAccessorProxySetByKey, PojoPropertyAccessorProxySetIndexed, PojoPropertyAccessorProxySetMapped, PojoPropertyAccessorSetField, PojoPropertyAccessorTwoArgMethod

public interface PojoPropertyAccessor
extends PojoAttributeName

A PojoPropertyAccessor gives access to a specific property of a POJO.

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

Method Summary
 AccessibleObject getAccessibleObject()
          This method gets the accessible object used to access (read/write) this property.
 Class<?> getDeclaringClass()
          This method gets the class reflecting the type that declared this accessor.
 PojoPropertyAccessorMode<? extends PojoPropertyAccessor> getMode()
          This method gets the mode of this accessor.
 int getModifiers()
          This method gets the modifiers of the accessible object.
 Class<?> getPropertyClass()
          This method gets the type as Class.
 GenericType<?> getPropertyType()
          This method gets the GenericType of this property.
 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.
 
Methods inherited from interface net.sf.mmm.util.pojo.descriptor.api.attribute.PojoAttributeName
getName
 

Method Detail

getMode

PojoPropertyAccessorMode<? extends PojoPropertyAccessor> getMode()
This method gets the mode of this accessor.

Returns:
the access mode.

getAccessibleObject

AccessibleObject getAccessibleObject()
This method gets the accessible object used to access (read/write) this property.

Returns:
the method to read this property or null if this property is NOT readable.
See Also:
PropertyDescriptor, Method, Constructor, Field

getModifiers

int getModifiers()
This method gets the modifiers of the accessible object.

Returns:
the modifiers of the field or method.
See Also:
Modifier, Field.getModifiers(), Method.getModifiers()

getReturnType

GenericType<?> getReturnType()
This method gets the GenericType of the object returned when this accessor is invoked.

Returns:
the return type.
See Also:
Method.getGenericReturnType(), Field.getGenericType()

getReturnClass

Class<?> getReturnClass()
This method gets the Class of the object returned when this accessor is invoked.
is a convenience method for getReturnType(). getUpperBound()

Returns:
the return class.
See Also:
Method.getReturnType(), Field.getType()

getPropertyType

GenericType<?> getPropertyType()
This method gets the GenericType of this property.
For a getter this will be the return-type while a setter typically has void as return-type and this method will return the type of its argument. For mapped or indexed getters/setters this method will return the item type.

Returns:
the GenericType reflecting the property.
See Also:
getPropertyClass(), PropertyDescriptor

getPropertyClass

Class<?> getPropertyClass()
This method gets the type as Class. It is a convenience method for getPropertyType(). getUpperBound() if the mode is for reading and getPropertyType(). getLowerBound() otherwise.

Returns:
the Class reflecting the property.

getDeclaringClass

Class<?> getDeclaringClass()
This method gets the class reflecting the type that declared this accessor. It may be the pojo-class this accessor was created from but it may also be a super-class where the field or method of this accessor is inherited from and is NOT overridden.
E.g. the read-accessor for the property "class" will have the declaring-class Object.

Returns:
the class reflecting the type that declared this accessor.


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