docs: private MethodInfoList getDeclaredMethodInfo(final String methodName, final boolean getNormalMethods,
              final boolean getConstructorMethods, final boolean getStaticInitializerMethods) {
          if (!scanResult.scanSpec.enableMethodInfo) {
              throw new IllegalArgumentException("Please call ClassGraph#enableMethodInfo() before #scan()");
          }
          if (methodInfo == null) {
              return MethodInfoList.EMPTY_LIST;
          }
          if (methodName == null) {
              // If no method name is provided, filter for methods with the right type (normal method / constructor /
              // static initializer)
              final MethodInfoList methodInfoList = new MethodInfoList();
              for (final MethodInfo mi : methodInfo) {
                  final String miName = mi.getName();
                  final boolean isConstructor = "<init>".equals(miName);
                  // (Currently static initializer methods are never returned by public methods)
                  final boolean isStaticInitializer = "<clinit>".equals(miName);
                  if ((isConstructor && getConstructorMethods) || (isStaticInitializer && getStaticInitializerMethods)
                          || (!isConstructor && !isStaticInitializer && getNormalMethods)) {
                      methodInfoList.add(mi);
                  }
              }
              return methodInfoList;
          } else {
              // If method name is provided, filter for methods whose name matches, and ignore method type
              boolean hasMethodWithName = false;
              for (final MethodInfo f : methodInfo) {
                  if (f.getName().equals(methodName)) {
                      hasMethodWithName = true;
                      break;
                  }
              }
              if (!hasMethodWithName) {
                  return MethodInfoList.EMPTY_LIST;
              }
              final MethodInfoList methodInfoList = new MethodInfoList();
              for (final MethodInfo mi : methodInfo) {
                  if (mi.getName().equals(methodName)) {
                      methodInfoList.add(mi);
                  }
              }
              return methodInfoList;
          }
      }