Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jxpath
Interface DynamicPropertyHandler

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

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:

- `"myMap/myKey"`
- `"myMap[@name = 'myKey']"`
- `"myMap[name(.) = 'myKey']"`

Version:
  $Revision: 1.3 $ $Date: 2003/03/11 00:59:12 $
Author:
  Dmitri Plotnikov

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

Method Detail

### getPropertyNames

    public java.lang.String[] getPropertyNames(java.lang.Object object)

  Returns a list of dynamic property names for the supplied object.

### getProperty

    public java.lang.Object getProperty(java.lang.Object object,
                                        java.lang.String propertyName)

  Returns the value of the specified dynamic property.

### setProperty

    public void setProperty(java.lang.Object object,
                            java.lang.String propertyName,
                            java.lang.Object value)

  Modifies the value of the specified dynamic property.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.