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

## org.apache.commons.jxpath
Interface DynamicPropertyHandler

All 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:

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

Version:
  $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
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 Detail

### getPropertyNames

    String[] getPropertyNames(Object object)

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

  Parameters:
    `object` - to inspect
  Returns:
    String[]

### getProperty

    Object getProperty(Object object,
                       String propertyName)

  Returns the value of the specified dynamic property.

  Parameters:
    `object` - to search
    `propertyName` - to retrieve
  Returns:
    Object

### setProperty

    void setProperty(Object object,
                     String propertyName,
                     Object value)

  Modifies the value of the specified dynamic property.

  Parameters:
    `object` - to modify
    `propertyName` - to modify
    `value` - to set

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

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.