code: public void setTextByReflection(Object obj, String text)
      {
          try {
              java.lang.reflect.Method method = obj.getClass().getMethod("setText", String.class);
              
              if (method != null)
                  method.invoke(obj, text);
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
docs: Lame method, since awt, swing, and android components all have setText methods.
  @param obj
  @param text