org.slim3.commons.beanutil
Class BeanDesc

java.lang.Object
  extended by org.slim3.commons.beanutil.BeanDesc

public final class BeanDesc
extends Object

This class describes bean information.

Since:
3.0
Author:
higa

Method Summary
static BeanDesc create(Class<?> beanClass)
          Creates the bean descriptor.
 Class<?> getBeanClass()
          Returns the bean class.
 PropertyDesc getPropertyDesc(int index)
          Returns the property descriptor for index.
 PropertyDesc getPropertyDesc(String propertyName)
          Returns the property descriptor.
 int getPropertyDescSize()
          Returns the number of property descriptors.
 boolean hasPropertyDesc(String propertyName)
          Returns true if this class has the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static BeanDesc create(Class<?> beanClass)
Creates the bean descriptor.

Parameters:
beanClass - the bean class
Returns:
the bean descriptor
Throws:
NullPointerException - if the beanClass parameter is null

getBeanClass

public Class<?> getBeanClass()
Returns the bean class.

Returns:
the bean class

hasPropertyDesc

public boolean hasPropertyDesc(String propertyName)
Returns true if this class has the property.

Parameters:
propertyName - the property name
Returns:
whether this class has the property

getPropertyDesc

public PropertyDesc getPropertyDesc(String propertyName)
                             throws PropertyNotFoundRuntimeException
Returns the property descriptor.

Parameters:
propertyName - the property name
Returns:
the property descriptor
Throws:
PropertyNotFoundRuntimeException - if the property is not found

getPropertyDesc

public PropertyDesc getPropertyDesc(int index)
Returns the property descriptor for index.

Parameters:
index - the index
Returns:
the property descriptor

getPropertyDescSize

public int getPropertyDescSize()
Returns the number of property descriptors.

Returns:
the number of property descriptors.


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.