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

## com.atomikos.beans
Class BeanInspector

    java.lang.Object
      com.atomikos.beans.BeanInspector

    public class BeanInspector

extends Object

A bean inspector is capable of detecting what properties can be set in a bean, setting or getting any such values and returning useful information about the bean.

Constructor Summary
`BeanInspector(Object bean)` Creates a new instance to configure a given bean.

Method Summary
`Object` | `getBean()` Get the bean instance.
`Property[]` | `getProperties()` Get all recognized properties for this bean.
`Property` | `getProperty(String name)` Get the property with the given name.
`String` | `getPropertyValue(String name)` Get the value of the given property as text.
`void` | `setPropertyValue(String name, String value)` Set the given property to the given text value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BeanInspector

    public BeanInspector(Object bean)

  Creates a new instance to configure a given bean.

  Parameters:
    `bean` - The bean to inspect and configure.

Method Detail

### getProperties

    public Property[] getProperties()
                             throws PropertyException

  Get all recognized properties for this bean.

  Returns:
    Property[] The properties found, or null if none.
  Throws:
    `PropertyException`

### getProperty

    public Property getProperty(String name)
                         throws PropertyException

  Get the property with the given name.

  Parameters:
    `name` - The name of the property.
  Returns:
    Property The property, null if not found.
  Throws:
    `PropertyException`

### getBean

    public Object getBean()

  Get the bean instance.

  Returns:
    Object The bean instance.

### setPropertyValue

    public void setPropertyValue(String name,
                                 String value)
                          throws ReadOnlyException,
                                 PropertyException

  Set the given property to the given text value.

  Parameters:
    `name` - The name of the property
    `value` - The value as text
  Throws:
    `ReadOnlyException` - If readonly
    `PropertyException` - On failure

### getPropertyValue

    public String getPropertyValue(String name)
                            throws PropertyException

  Get the value of the given property as text.

  Parameters:
    `name` - The name of the property.
  Returns:
    String The value as text.
  Throws:
    `PropertyException`

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 © 2012. All Rights Reserved.