org.cojen.util
Class BeanPropertyAccessor

java.lang.Object
  extended by org.cojen.util.BeanPropertyAccessor

public abstract class BeanPropertyAccessor
extends Object

Provides a simple and efficient means of reading and writing bean properties. BeanPropertyAccessor auto-generates code, eliminating the need to invoke methods via reflection. Bean access methods are bound-to directly, using a special hash/switch design pattern.

Author:
Brian S O'Neill

Constructor Summary
protected BeanPropertyAccessor()
           
 
Method Summary
static BeanPropertyAccessor forClass(Class clazz)
          Returns a new or cached BeanPropertyAccessor for the given class.
abstract  Object getPropertyValue(Object bean, String property)
           
abstract  void setPropertyValue(Object bean, String property, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanPropertyAccessor

protected BeanPropertyAccessor()
Method Detail

forClass

public static BeanPropertyAccessor forClass(Class clazz)
Returns a new or cached BeanPropertyAccessor for the given class.


getPropertyValue

public abstract Object getPropertyValue(Object bean,
                                        String property)
                                 throws NoSuchPropertyException
Throws:
NoSuchPropertyException

setPropertyValue

public abstract void setPropertyValue(Object bean,
                                      String property,
                                      Object value)
                               throws NoSuchPropertyException
Throws:
NoSuchPropertyException


Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.