org.apache.commons.lang.reflect.MethodUtils#invokeMethod ( )源码实例Demo

下面列出了org.apache.commons.lang.reflect.MethodUtils#invokeMethod ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: hiped2   文件: TaskThroughput.java
public static long extractLongFieldValue(TaskMetrics m,
                                         String fieldName)
    throws IllegalAccessException, InvocationTargetException,
    NoSuchMethodException {
  return (Long) MethodUtils.invokeMethod(m, fieldName, null);
}
 
源代码2 项目: hiped2   文件: DataSkewMetrics.java
public static long extractLongFieldValue(TaskMetrics m,
                                         String fieldName)
    throws IllegalAccessException, InvocationTargetException,
    NoSuchMethodException {
  return (Long) MethodUtils.invokeMethod(m, fieldName, null);
}
 
源代码3 项目: hiped2   文件: JobHistoryHelper.java
public static long extractLongFieldValue(TaskMetrics m,
                                         String fieldName)
    throws IllegalAccessException, InvocationTargetException,
    NoSuchMethodException {
  return (Long) MethodUtils.invokeMethod(m, fieldName, null);
}
 
源代码4 项目: hiped2   文件: MetricSummary.java
public static long extractLongFieldValue(TaskMetrics m,
                                         String fieldName)
    throws IllegalAccessException, InvocationTargetException,
    NoSuchMethodException {
  return (Long) MethodUtils.invokeMethod(m, fieldName, null);
}
 
源代码5 项目: openhab1-addons   文件: PropertyUtils.java
/**
 * Returns the getter value from the object instance, nested properties are
 * possible. If the propertyName is for example temperature.current, the
 * methods getTemperature().getCurrent() are called.
 */
public static Object getPropertyValue(Object instance, String property) throws Exception {
    Object object = getNestedObject(instance, property);
    String getMethod = toGetterString(PropertyResolver.last(property));
    return MethodUtils.invokeMethod(object, getMethod, null);
}