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

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
All Implemented Interfaces:
PojoPropertyAccessor, PojoAttributeName
Direct Known Subclasses:
AbstractPojoPropertyAccessorField, AbstractPojoPropertyAccessorMethod

public abstract class AbstractPojoPropertyAccessorBase
extends AbstractPojoPropertyAccessor

This is the major base-implementation of the PojoPropertyAccessor interface.

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

Field Summary
private  String name
           
private  GenericType<?> propertyType
           
 
Constructor Summary
AbstractPojoPropertyAccessorBase(String propertyName, Type propertyType, PojoDescriptor<?> descriptor, PojoDescriptorDependencies configuration)
          The constructor.
 
Method Summary
 String getName()
          This method gets the programmatic (technical) name of the according property.
 GenericType<?> getPropertyType()
          This method gets the GenericType of this property.
 
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, getMode, getModifiers, getReturnClass, getReturnType
 

Field Detail

name

private final String name
See Also:
getName()

propertyType

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

AbstractPojoPropertyAccessorBase

public AbstractPojoPropertyAccessorBase(String propertyName,
                                        Type propertyType,
                                        PojoDescriptor<?> descriptor,
                                        PojoDescriptorDependencies configuration)
The constructor.

Parameters:
propertyName - is the name of the property.
propertyType - is the generic type of the property.
descriptor - is the descriptor this accessor is intended for.
configuration - are the PojoDescriptorDependencies to use.
Method Detail

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

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


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