001 package org.springframework.richclient.widget.table; 002 003 import java.lang.reflect.InvocationTargetException; 004 005 /** 006 * Accessor interface: defines a way to access a value and it's type. 007 * 008 * @author Jan Hoskens 009 * @since 0.5.0 010 */ 011 public interface Accessor 012 { 013 014 /** 015 * Get the value from the given target entity. 016 * 017 * @param fromEntity 018 * the entity from which the value should be obtained. 019 * @return the value. 020 * @throws IllegalAccessException 021 * @throws InvocationTargetException 022 */ 023 Object getValue(Object fromEntity) throws IllegalAccessException, InvocationTargetException; 024 025 /** 026 * Returns the property type of the value that can be obtained through this accessor. 027 */ 028 Class<?> getPropertyType(); 029 }