net.sf.mmm.util.pojo.descriptor.impl
Class PojoPropertyDescriptorImpl

java.lang.Object
  extended by net.sf.mmm.util.pojo.descriptor.base.AbstractPojoPropertyDescriptor
      extended by net.sf.mmm.util.pojo.descriptor.impl.PojoPropertyDescriptorImpl
All Implemented Interfaces:
PojoAttributeName, PojoPropertyDescriptor

public class PojoPropertyDescriptorImpl
extends AbstractPojoPropertyDescriptor

This is the implementation of the PojoPropertyDescriptor interface.

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

Field Summary
private  Map<PojoPropertyAccessorMode<?>,PojoPropertyAccessor> accessorMap
           
private  Collection<? extends PojoPropertyAccessor> accessors
           
 
Constructor Summary
PojoPropertyDescriptorImpl(String propertyName)
          The constructor.
 
Method Summary
<ACCESSOR extends PojoPropertyAccessor>
ACCESSOR
getAccessor(PojoPropertyAccessorMode<ACCESSOR> mode)
          This method gets the accessor to access the represented property in the way given by mode.
 Collection<? extends PojoPropertyAccessor> getAccessors()
          This method gets all available accessors for the represented property.
 PojoPropertyAccessor putAccessor(PojoPropertyAccessor accessor)
          This method puts the given accessor into this property-descriptor.
 
Methods inherited from class net.sf.mmm.util.pojo.descriptor.base.AbstractPojoPropertyDescriptor
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

accessorMap

private final Map<PojoPropertyAccessorMode<?>,PojoPropertyAccessor> accessorMap
See Also:
getAccessor(PojoPropertyAccessorMode)

accessors

private final Collection<? extends PojoPropertyAccessor> accessors
See Also:
getAccessors()
Constructor Detail

PojoPropertyDescriptorImpl

public PojoPropertyDescriptorImpl(String propertyName)
The constructor.

Parameters:
propertyName - is the name of the property.
Method Detail

getAccessor

public <ACCESSOR extends PojoPropertyAccessor> ACCESSOR getAccessor(PojoPropertyAccessorMode<ACCESSOR> mode)
This method gets the accessor to access the represented property in the way given by mode.

Type Parameters:
ACCESSOR - is the type of the requested accessor.
Parameters:
mode - is the mode of the requested accessor.
Returns:
the accessor for the given mode or null if no such accessor exists.

getAccessors

public Collection<? extends PojoPropertyAccessor> getAccessors()
This method gets all available accessors for the represented property.

Returns:
a collection with all property descriptors

putAccessor

public PojoPropertyAccessor putAccessor(PojoPropertyAccessor accessor)
This method puts the given accessor into this property-descriptor.
ATTENTION:
Be careful NOT to accidently replace existing accessors.

Specified by:
putAccessor in class AbstractPojoPropertyDescriptor
Parameters:
accessor - is the accessor to add.
Returns:
the PojoPropertyAccessor with the same mode as the given accessor that has been replaced by accessor or null if none has been replaced.
See Also:
PojoPropertyDescriptor.getAccessor(net.sf.mmm.util.pojo.descriptor.api.accessor.PojoPropertyAccessorMode)


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