org.apache.taglibs.io
Class BeanHelper

java.lang.Object
  extended byorg.apache.taglibs.io.BeanHelper

public class BeanHelper
extends java.lang.Object

A collection of bean and introspection helper methods.

Version:
$Revision$
Author:
James Strachan

Field Summary
protected static java.lang.Object[] NULL_ARGUMENTS
           
 
Constructor Summary
BeanHelper()
           
 
Method Summary
static java.lang.Object getProperty(java.lang.Object bean, java.lang.String propertyName)
          Gets the value of the given property
protected static java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.Object bean, java.lang.String propertyName)
           
static void setProperty(java.lang.Object bean, java.lang.String propertyName, java.lang.Object value)
          Sets the value of the given property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_ARGUMENTS

protected static final java.lang.Object[] NULL_ARGUMENTS
Constructor Detail

BeanHelper

public BeanHelper()
Method Detail

getProperty

public static java.lang.Object getProperty(java.lang.Object bean,
                                           java.lang.String propertyName)
                                    throws javax.servlet.jsp.JspException
Gets the value of the given property

Parameters:
bean - is the JavaBean which contains the property
propertyName - is the name of the property to set
Returns:
the value of the given property
Throws:
javax.servlet.jsp.JspException

setProperty

public static void setProperty(java.lang.Object bean,
                               java.lang.String propertyName,
                               java.lang.Object value)
                        throws javax.servlet.jsp.JspException
Sets the value of the given property

Parameters:
bean - is the JavaBean which contains the property
propertyName - is the name of the property to set
value - is the value of the property to set
Returns:
true if the property was set else false if it could not be set
Throws:
javax.servlet.jsp.JspException

getPropertyDescriptor

protected static java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.Object bean,
                                                                     java.lang.String propertyName)
                                                              throws javax.servlet.jsp.JspException
Returns:
a PropertyDescriptor for the given bean and property name
Throws:
javax.servlet.jsp.JspException


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.