public class BeanUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
getBeanProperty(Object bean,
String propertyName)
Retrieve a named bean property value.
|
static long |
getLongBeanProperty(Object bean,
String propertyName)
Retrieve a Long bean property value.
|
public static Object getBeanProperty(Object bean, String propertyName)
bean
- The bean instancepropertyName
- The name of the property whose value to extractpublic static long getLongBeanProperty(Object bean, String propertyName) throws NoSuchFieldException
bean
- The bean instancepropertyName
- The name of the property whose value to extractNoSuchFieldException
- If the value is null (wow)Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.