Copyright 2002 by aragost

com.aragost.lang
Class Beans

java.lang.Object
  |
  +--com.aragost.lang.Beans

public abstract class Beans
extends java.lang.Object

A utility for with misc methods related to Beans and properties.


Constructor Summary
Beans()
           
 
Method Summary
static java.lang.Object getProperty(java.lang.Object bean, java.lang.String propertyName)
           
static java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.Class clazz, java.lang.String propertyName)
           
static boolean hasProperty(java.lang.Object bean, java.lang.String property)
          Check if the specified bean has a property with the specified name.
static java.lang.Object setProperty(java.lang.Object bean, java.lang.String propertyName, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Beans

public Beans()
Method Detail

hasProperty

public static boolean hasProperty(java.lang.Object bean,
                                  java.lang.String property)
Check if the specified bean has a property with the specified name.

Parameters:
bean - The bean that is being checked if it has the property.
property - Name of property to check if exists.
Returns:
boolean

getProperty

public static java.lang.Object getProperty(java.lang.Object bean,
                                           java.lang.String propertyName)

setProperty

public static java.lang.Object setProperty(java.lang.Object bean,
                                           java.lang.String propertyName,
                                           java.lang.Object value)
                                    throws java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException

getPropertyDescriptor

public static java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.Class clazz,
                                                                  java.lang.String propertyName)

Copyright 2002 by aragost