code: public static Object callGetter(View view, String methodName) {
          try {
              Method method = view.getClass().getMethod(methodName);
              return method.invoke(view);
          } catch (SecurityException ex) {
              throw new AttributeAccessException(ex);
          } catch (NoSuchMethodException ex) {
              throw new AttributeAccessException("No such attribute", ex);
          } catch (IllegalAccessException ex) {
              throw new AttributeAccessException(ex);
          } catch (InvocationTargetException ex) {
              throw new AttributeAccessException(ex);
          }
      }
docs: Calls the given method by name on the given view, assuming that it's a getter,
  i.e., it doesn't have arguments.
  @return the result of the method call
  @throws AttributeAccessException when the method doesn't exist or can't be
  called for various reasons