net.sf.mmm.util.pojo.descriptor.base.accessor
Class AbstractPojoPropertyAccessorProxy

java.lang.Object
  extended by net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessor
      extended by net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorProxy
All Implemented Interfaces:
PojoPropertyAccessor, PojoAttributeName
Direct Known Subclasses:
AbstractPojoPropertyAccessorProxyAdapter, PojoPropertyAccessorProxyGetByIndex, PojoPropertyAccessorProxyGetByKey, PojoPropertyAccessorProxySetByIndex, PojoPropertyAccessorProxySetByKey

public abstract class AbstractPojoPropertyAccessorProxy
extends AbstractPojoPropertyAccessor

This is the abstract implementation of the PojoPropertyAccessor interface that delegates to another accessor.

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

Constructor Summary
AbstractPojoPropertyAccessorProxy()
          The constructor.
 
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.
protected abstract  PojoPropertyAccessor getDelegate()
          This method gets the accessor this proxy delegates to.
 PojoPropertyAccessorMode<? extends PojoPropertyAccessor> getMode()
          This method gets the mode of this accessor.
 int getModifiers()
          This method gets the modifiers of the accessible object.
 String getName()
          This method gets the programmatic (technical) name of the according property.
 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 class net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessor
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractPojoPropertyAccessorProxy

public AbstractPojoPropertyAccessorProxy()
The constructor.

Method Detail

getDelegate

protected abstract PojoPropertyAccessor getDelegate()
This method gets the accessor this proxy delegates to.

Returns:
the delegate.

getAccessibleObject

public 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

getDeclaringClass

public 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.

getModifiers

public 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()

getReturnClass

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

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

getReturnType

public 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()

getPropertyClass

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

Specified by:
getPropertyClass in interface PojoPropertyAccessor
Overrides:
getPropertyClass in class AbstractPojoPropertyAccessor
Returns:
the Class reflecting the property.

getPropertyType

public 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:
PojoPropertyAccessor.getPropertyClass(), PropertyDescriptor

getName

public String getName()
This method gets the programmatic (technical) name of the according property.
E.g. for the read accessor public String getFooBar() the property name would be fooBar.

Returns:
the property name.
See Also:
PropertyDescriptor

getMode

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

Returns:
the access mode.


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