public class BeanUtils
extends java.lang.Object
Constructor and Description |
---|
BeanUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
getBeanProperty(java.lang.Object bean,
java.lang.String propertyName)
Retrieve a named bean property value.
|
private static java.lang.reflect.Field |
getField(java.lang.Object bean,
java.lang.String propertyName)
Return the named field on the bean or null if not found.
|
static long |
getLongBeanProperty(java.lang.Object bean,
java.lang.String propertyName)
Retrieve a Long bean property value.
|
private static java.lang.reflect.Method |
getMethod(java.lang.Object bean,
java.lang.String propertyName)
Return the named getter method on the bean or null if not found.
|
private static void |
validateArgs(java.lang.Object bean,
java.lang.String propertyName) |
private static java.lang.reflect.Method getMethod(java.lang.Object bean, java.lang.String propertyName)
bean
- propertyName
- private static java.lang.reflect.Field getField(java.lang.Object bean, java.lang.String propertyName)
bean
- propertyName
- private static void validateArgs(java.lang.Object bean, java.lang.String propertyName)
public static java.lang.Object getBeanProperty(java.lang.Object bean, java.lang.String propertyName)
bean
- beanpropertyName
- public static long getLongBeanProperty(java.lang.Object bean, java.lang.String propertyName) throws java.lang.NoSuchFieldException
bean
- beanpropertyName
- java.lang.NoSuchFieldException