code: @SuppressWarnings("unchecked")
      public static Object searchProperty(Object leftParameter, String name) throws Exception {
          Class<?> leftClass = leftParameter.getClass();
          Object result;
          if (leftParameter.getClass().isArray() && "length".equals(name)) {
              result = Array.getLength(leftParameter);
          } else if (leftParameter instanceof Map) {
              result = ((Map<Object, Object>) leftParameter).get(name);
          } else {
              try {
                  String getter = "get" + name.substring(0, 1).toUpperCase()
                          + name.substring(1);
                  Method method = leftClass.getMethod(getter);
                  if (!method.isAccessible()) {
                      method.setAccessible(true);
                  }
                  result = method.invoke(leftParameter);
              } catch (NoSuchMethodException e2) {
                  try {
                      String getter = "is"
                              + name.substring(0, 1).toUpperCase()
                              + name.substring(1);
                      Method method = leftClass.getMethod(getter);
                      if (!method.isAccessible()) {
                          method.setAccessible(true);
                      }
                      result = method.invoke(leftParameter);
                  } catch (NoSuchMethodException e3) {
                      Field field = leftClass.getField(name);
                      result = field.get(leftParameter);
                  }
              }
          }
          return result;
      }
docs: <p>searchProperty.</p>
  
  @param leftParameter a {@link java.lang.Object} object.
  @param name a {@link java.lang.String} object.
  @return a {@link java.lang.Object} object.
  @throws java.lang.Exception if any.