class ReflectUtils {

    public static Method getPropertyGetterMethod(Class clazz, String property) {
        String methodName = "get" + property.substring(0, 1).toUpperCase() + property.substring(1);
        Method method;
        try {
            method = clazz.getMethod(methodName);
        } catch (NoSuchMethodException e) {
            try {
                methodName = "is" + property.substring(0, 1).toUpperCase() + property.substring(1);
                method = clazz.getMethod(methodName);
            } catch (NoSuchMethodException e1) {
                throw new SofaRpcRuntimeException("No getter method for " + clazz.getName() + "#" + property, e);
            }
        }
        return method;
    }

}