private static Method _getGetterOrSetter(String name, Class<?> klass, boolean isGetter) {

    if (klass == null || isEmptyTrim(name)) {
      throw new IllegalArgumentException(logger.error(BEAN_UTIL_ERR_CLASS_NULL));
    }

    BeanInfo info = null;

    try {
      info = getBeanInfo(klass);
    }
    catch (IntrospectionException x) {
      logger.error(BEAN_UTIL_ERR_BEAN_INFO, x, klass.getName());
    }

    if (info != null) {
      PropertyDescriptor[] descriptors = info.getPropertyDescriptors();

      if (descriptors != null) {
        for (PropertyDescriptor descriptor : descriptors) {
          if (descriptor.getName().equals(name)) {
            return isGetter ? descriptor.getReadMethod() : descriptor.getWriteMethod();
          }
        }
      }
    }

    return null;

  }