docs: private static Object filterPropertyMethod(Object methodOrList, boolean isGetter, boolean booleanGetter) {
          // Method has been optimized to reach a target of 325 bytecode size, making it JIT'able
          Object ret = null;
  
          if (methodOrList instanceof MetaMethod) {
              MetaMethod element = (MetaMethod)methodOrList;
              int parameterCount = element.getParameterTypes().length;
              if (!isGetter &&
                      //(element.getReturnType() == Void.class || element.getReturnType() == Void.TYPE) &&
                      parameterCount == 1) {
                  ret = element;
              }
              Class returnType = element.getReturnType();
              if (isGetter &&
                      !(returnType == Void.class || returnType == Void.TYPE) &&
                      (!booleanGetter || returnType == Boolean.class || returnType == Boolean.TYPE) &&
                      parameterCount == 0) {
                  ret = element;
              }
          }
          if (methodOrList instanceof FastArray) {
              FastArray methods = (FastArray) methodOrList;
              final int len = methods.size();
              final Object[] data = methods.getArray();
              for (int i = 0; i != len; ++i) {
                  MetaMethod element = (MetaMethod) data[i];
                  int parameterCount = element.getParameterTypes().length;
                  if (!isGetter &&
                          //(element.getReturnType() == Void.class || element.getReturnType() == Void.TYPE) &&
                          parameterCount == 1) {
                      ret = addElementToList(ret, element);
                  }
                  Class returnType = element.getReturnType();
                  if (isGetter &&
                          !(returnType == Void.class || returnType == Void.TYPE) &&
                          parameterCount == 0) {
                      ret = addElementToList(ret, element);
                  }
              }
          }
  
          if (ret == null
                  || (ret instanceof MetaMethod)
                  || !isGetter) {
              return ret;
          }
  
          // we found multiple matching methods
          // this is a problem, because we can use only one
          // if it is a getter, then use the most general return
          // type to decide which method to use. If it is a setter
          // we use the type of the first parameter
          MetaMethod method = null;
          int distance = -1;
          for (final Object o : ((List) ret)) {
              MetaMethod element = (MetaMethod) o;
              int localDistance = distanceToObject(element.getReturnType());
              //TODO: maybe implement the case localDistance==distance
              if (distance == -1 || distance > localDistance) {
                  distance = localDistance;
                  method = element;
              }
          }
          return method;
      }