org.apache.commons.jxpath

Interface DynamicPropertyHandler

Known Implementing Classes:
HttpSessionHandler, MapDynamicPropertyHandler, PageContextHandler, PageScopeContextHandler, ServletContextHandler, ServletRequestHandler

public interface DynamicPropertyHandler

A generic mechanism for accessing collections of name/value pairs. Examples of such collections are HashMap, Properties, ServletContext. In order to add support for a new such collection type to JXPath, perform the following two steps:
  1. Build an implementation of the DynamicPropertyHandler interface for the desired collection type.
  2. Invoke the static method JXPathIntrospector.registerDynamicClass(class, handlerClass)
JXPath allows access to dynamic properties using these three formats:
Version:
$Revision: 1.5 $ $Date: 2004/02/29 14:17:42 $
Author:
Dmitri Plotnikov

Method Summary

Object
getProperty(Object object, String propertyName)
Returns the value of the specified dynamic property.
String[]
getPropertyNames(Object object)
Returns a list of dynamic property names for the supplied object.
void
setProperty(Object object, String propertyName, Object value)
Modifies the value of the specified dynamic property.

Method Details

getProperty

public Object getProperty(Object object,
                          String propertyName)
Returns the value of the specified dynamic property.

getPropertyNames

public String[] getPropertyNames(Object object)
Returns a list of dynamic property names for the supplied object.

setProperty

public void setProperty(Object object,
                        String propertyName,
                        Object value)
Modifies the value of the specified dynamic property.