gnu.beanfactory
Interface Handle


public interface Handle

Provides a level of indirection for manipulating java beans through a set of accessor methods.

Version:
$Id: Handle.java,v 1.14 2001/10/04 17:35:29 rschoening Exp $
Author:
Rob Schoening <rob@beanfactory.net>

Method Summary
 java.lang.Object getIndexedProperty(java.lang.String pname, int idx)
           
 java.lang.Object getObject()
          Obtain a reference to the underlying bean.
 java.lang.Object getProperty(java.lang.String propertyName)
          Obtains the value of a property by name.
 java.lang.Object invoke(java.lang.String method)
          Invoke a no-arg method.
 void setProperty(java.lang.String propertyName, java.lang.String value)
          Sets the value of a bean property.
 

Method Detail

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
                             throws BeanFactoryException
Obtains the value of a property by name. Primitive properties are wrapped in their respective object wrappers. This method should support "nested" properties.
Parameters:
propertyName - the name of the property to be retrieved
Returns:
the value of the property

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.String value)
                 throws BeanFactoryException
Sets the value of a bean property.
Parameters:
propertyName - name of the property to be set
value - string representation of the new property value

invoke

public java.lang.Object invoke(java.lang.String method)
                        throws BeanFactoryException
Invoke a no-arg method.
Parameters:
method - the name of the method

getIndexedProperty

public java.lang.Object getIndexedProperty(java.lang.String pname,
                                           int idx)
                                    throws BeanFactoryException

getObject

public java.lang.Object getObject()
Obtain a reference to the underlying bean.