org.rhq.core.pluginapi.util
Class ObjectUtil
java.lang.Object
org.rhq.core.pluginapi.util.ObjectUtil
public class ObjectUtil
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectUtil
public ObjectUtil()
lookupAttributeProperty
public static Object lookupAttributeProperty(Object value,
String property)
lookupDeepNumericAttributeProperty
public static Double lookupDeepNumericAttributeProperty(Object value,
String propertyPath)
- Reads a numeric value from a deep object graph as per
ObjectUtil.lookupDeepAttributeProperty()
- Parameters:
value
- The object to look intopropertyPath
- the property path to search
- Returns:
- the double value read from the object's property path or Double.NaN if it can't be read
lookupDeepAttributeProperty
public static Object lookupDeepAttributeProperty(Object value,
String propertyPath)
- Looks up deep object graph attributes using a dot delimited java bean spec style path. So if I have an object A
with a Member object B with a String value C I can refer to it as "b.c" and pass in the object A and I'll get
back the value of a.getB().getC()
- Parameters:
value
- The object to look intopropertyPath
- the property path to search
- Returns:
- the value read from the object's property path
Copyright © 2008 RHQ Project Advisory Board (Red Hat, Inc. and Hyperic, Inc.). All Rights Reserved.