Java Reflection Method Get from Object getMethodValue(Object base, Method method)

Here you can find the source of getMethodValue(Object base, Method method)

Description

get Method Value

License

Open Source License

Declaration

private static Object getMethodValue(Object base, Method method) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Main {
    private static Object getMethodValue(Object base, Method method) {
        try {/* w  w  w . j a  v  a2s.  c o  m*/
            return method.invoke(base);
        } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException ex) {
            throw new IllegalArgumentException(ex);
        }
    }
}

Related

  1. getMethodsAnnotatedWithValue(Class anno, Object o, String name, Object value)
  2. getMethodsByStartsWithName(String name, Object o)
  3. getMethodsForObject(Object o2, String[] passedMethods)
  4. getMethodsIncludingHierarchy(Object comp, Class annotation)
  5. getMethodValue(Method method, Object instance)
  6. getMethodValue(Object target, String methodName)
  7. getMethodVector(Object object)
  8. getMethodWithExactName(Class clazz, String name)
  9. getMethodWithPrefix(final Object o, final String fieldName, final String prefix)