org.apache.beehive.netui.util.cache
Class PropertyCache

Object
  extended by PropertyCache

public class PropertyCache
extends Object

The PropertyCache is used to track the JavaBean properties and public fields of a set of classes that are stored in the cache. This implementation provides a significant speed-up when looking-up reflected metadata of Java classes. It is primarily used in the NetUI expression engine to provide fast access to the properties and fields of classes against which expressions are being evaluated.


Constructor Summary
PropertyCache()
           
 
Method Summary
 Field getField(Class type, String field)
           
 PropertyDescriptor[] getPropertyDescriptors(Class type)
          Get an array of PropertyDescriptor objects that describe JavaBean properties of the given type.
 Method getPropertyGetter(Class type, String property)
           
 Method getPropertySetter(Class type, String property)
           
 Class getPropertyType(Class type, String property)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyCache

public PropertyCache()
Method Detail

getPropertyDescriptors

public final PropertyDescriptor[] getPropertyDescriptors(Class type)
Get an array of PropertyDescriptor objects that describe JavaBean properties of the given type. This array should not be modified.

Parameters:
type - the Class whose JavaBean properties to find
Returns:
an array of PropertyDescriptor objects that describe the JavaBean properties

getPropertyGetter

public final Method getPropertyGetter(Class type,
                                      String property)

getPropertySetter

public final Method getPropertySetter(Class type,
                                      String property)

getPropertyType

public final Class getPropertyType(Class type,
                                   String property)

getField

public final Field getField(Class type,
                            String field)