Java Reflection Method Getter Get getGetterValue(Method method, Object o)

Here you can find the source of getGetterValue(Method method, Object o)

Description

get Getter Value

License

Open Source License

Declaration

public static Object getGetterValue(Method method, Object o) 

Method Source Code


//package com.java2s;
import java.lang.reflect.Method;

public class Main {
    public static Object getGetterValue(Method method, Object o) {
        try {// w ww  .  j  a  v  a2 s  .  c  o  m
            return method.invoke(o, null);
        } catch (Exception e) {
        }
        return null;
    }
}

Related

  1. getGetters(Object obj)
  2. getGettersAndSetters(Object obj)
  3. getGetterSetterMethodsParameterType(Field f)
  4. getGetterShorthandName(Method method)
  5. getGettersMethods(Object object)
  6. getGetterWithPrefix(final Class target, final String property, final String prefix)