org.jboss.beans.info.plugins
Class BeanInfoUtil

java.lang.Object
  extended by org.jboss.beans.info.plugins.BeanInfoUtil

public class BeanInfoUtil
extends Object

Bean info helper. Handles nested property names.

Author:
Ales Justin

Constructor Summary
BeanInfoUtil()
           
 
Method Summary
static Object get(BeanInfo beanInfo, Object target, String name)
          Get the value from target.
protected static PropertyInfo getNestedPropertyInfo(BeanInfo beanInfo, Object target, String[] propertys)
          Get the nested property info from target.
protected static Object getNestedTarget(BeanInfo beanInfo, Object target, String[] propertys)
          Get the value from target.
static PropertyInfo getPropertyInfo(BeanInfo beanInfo, Object target, String name)
          Get nested property info.
static void set(BeanInfo beanInfo, Object target, String name, Object value)
          Set the value on target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanInfoUtil

public BeanInfoUtil()
Method Detail

getNestedTarget

protected static Object getNestedTarget(BeanInfo beanInfo,
                                        Object target,
                                        String[] propertys)
                                 throws Throwable
Get the value from target.

Parameters:
beanInfo - the bean info
target - the target
propertys - the property names
Returns:
getter value
Throws:
Throwable - for any error

getNestedPropertyInfo

protected static PropertyInfo getNestedPropertyInfo(BeanInfo beanInfo,
                                                    Object target,
                                                    String[] propertys)
                                             throws Throwable
Get the nested property info from target.

Parameters:
beanInfo - the bean info
target - the target
propertys - the property names
Returns:
nested property info
Throws:
Throwable - for any error

get

public static Object get(BeanInfo beanInfo,
                         Object target,
                         String name)
                  throws Throwable
Get the value from target.

Parameters:
beanInfo - the bean info
target - the target
name - the property name, can be nested
Returns:
getter value
Throws:
Throwable - for any error

set

public static void set(BeanInfo beanInfo,
                       Object target,
                       String name,
                       Object value)
                throws Throwable
Set the value on target.

Parameters:
beanInfo - the bean info
target - the target
name - the property name, can be nested
value - the value
Throws:
Throwable - for any error

getPropertyInfo

public static PropertyInfo getPropertyInfo(BeanInfo beanInfo,
                                           Object target,
                                           String name)
                                    throws Throwable
Get nested property info.

Parameters:
beanInfo - the bean info
target - the target
name - the nested property name
Returns:
nested property
Throws:
Throwable - for any error


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.