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

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
          extended by net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorProxyAdapter
              extended by net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorProxyAdapterComponentType
All Implemented Interfaces:
PojoPropertyAccessor, PojoAttributeName
Direct Known Subclasses:
PojoPropertyAccessorProxyAdd, PojoPropertyAccessorProxyGetIndexed, PojoPropertyAccessorProxyGetMapped, PojoPropertyAccessorProxyRemove, PojoPropertyAccessorProxySetIndexed, PojoPropertyAccessorProxySetMapped

public abstract class AbstractPojoPropertyAccessorProxyAdapterComponentType
extends AbstractPojoPropertyAccessorProxyAdapter

This is the abstract base implementation of a PojoPropertyAccessor that acts as proxy to a delegate allowing to add new ways to access a property.
It extends AbstractPojoPropertyAccessorProxyAdapter implementing getPropertyType() to return the component-type from the return-type of the delegate.

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

Field Summary
private  GenericType<?> propertyType
           
 
Constructor Summary
AbstractPojoPropertyAccessorProxyAdapterComponentType(PojoDescriptorDependencies dependencies, PojoPropertyAccessorNonArg containerGetAccessor)
          The constructor.
 
Method Summary
 Class<?> getPropertyClass()
          This method gets the type as Class.
 GenericType<?> getPropertyType()
          This method gets the GenericType of this property.
 
Methods inherited from class net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorProxyAdapter
getDelegate, getDependencies
 
Methods inherited from class net.sf.mmm.util.pojo.descriptor.base.accessor.AbstractPojoPropertyAccessorProxy
getAccessibleObject, getDeclaringClass, getMode, getModifiers, getName, getReturnClass, getReturnType
 
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
 

Field Detail

propertyType

private final GenericType<?> propertyType
See Also:
getPropertyType()
Constructor Detail

AbstractPojoPropertyAccessorProxyAdapterComponentType

public AbstractPojoPropertyAccessorProxyAdapterComponentType(PojoDescriptorDependencies dependencies,
                                                             PojoPropertyAccessorNonArg containerGetAccessor)
The constructor.

Parameters:
dependencies - are the PojoDescriptorDependencies to use.
containerGetAccessor - is the accessor delegate that gets an array or Collection property.
Method Detail

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.

Specified by:
getPropertyType in interface PojoPropertyAccessor
Overrides:
getPropertyType in class AbstractPojoPropertyAccessorProxy
Returns:
the GenericType reflecting the property.
See Also:
PojoPropertyAccessor.getPropertyClass(), PropertyDescriptor

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 AbstractPojoPropertyAccessorProxy
Returns:
the Class reflecting the property.


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