org.springframework.richclient.widget.table
Class SimpleAccessor

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.widget.table.SimpleAccessor
All Implemented Interfaces:
Accessor
Direct Known Subclasses:
SimpleWriter

public class SimpleAccessor
extends Object
implements Accessor

Basic implementation of an Accessor.

Since:
0.5.0
Author:
Jan Hoskens

Constructor Summary
SimpleAccessor(Class<?> clazz, String propertyName)
          Constructor.
 
Method Summary
 Class<?> getPropertyType()
          Returns the property type of the value that can be obtained through this accessor.
 Object getValue(Object fromEntity)
          Get the value from the given target entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAccessor

public SimpleAccessor(Class<?> clazz,
                      String propertyName)
Constructor. Retrieves the getter of the given property.

Parameters:
clazz - the type of the entity.
propertyName - name of the property.
Method Detail

getValue

public Object getValue(Object fromEntity)
                throws IllegalAccessException,
                       InvocationTargetException
Get the value from the given target entity.

Specified by:
getValue in interface Accessor
Parameters:
fromEntity - the entity from which the value should be obtained.
Returns:
the value.
Throws:
IllegalAccessException
InvocationTargetException

getPropertyType

public Class<?> getPropertyType()
Returns the property type of the value that can be obtained through this accessor.

Specified by:
getPropertyType in interface Accessor


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.