private static @Nullable String getModulesSequence(@NotNull String artifactOutputPath) {
      final Method of;
      try {
        of = Class.forName("java.lang.module.ModuleFinder").getMethod("of", Path[].class);
      }
      catch (NoSuchMethodException | ClassNotFoundException e) {
        LOG.error("Couldn't get java.lang.module.ModuleFinder#of method");
        return null;
      }
      final Object finder;
      try {
        finder = of.invoke(null, new Object[]{new Path[]{Paths.get(artifactOutputPath)}});
      }
      catch (IllegalAccessException | InvocationTargetException e) {
        LOG.error("Couldn't call java.lang.module.ModuleFinder#of method");
        return null;
      }

      final Method findAll;
      try {
        findAll = Class.forName("java.lang.module.ModuleFinder").getMethod("findAll");
      }
      catch (NoSuchMethodException | ClassNotFoundException e) {
        LOG.error("Couldn't get java.lang.module.ModuleFinder#findAll method");
        return null;
      }
      final Object allRefs;
      try {
        allRefs = findAll.invoke(finder);
      }
      catch (IllegalAccessException | InvocationTargetException e) {
        LOG.error("Couldn't call java.lang.module.ModuleFinder#findAll method");
        return null;
      }

      Set moduleRefs = (Set)allRefs;
      if (moduleRefs.isEmpty()) return null;

      final Method descriptor;
      try {
        descriptor = Class.forName("java.lang.module.ModuleReference").getMethod("descriptor");
      }
      catch (NoSuchMethodException | ClassNotFoundException e) {
        LOG.error("Couldn't get java.lang.module.ModuleReference#descriptor method");
        return null;
      }
      final Method name;
      try {
        name = Class.forName("java.lang.module.ModuleDescriptor").getMethod("name");
      }
      catch (NoSuchMethodException | ClassNotFoundException e) {
        LOG.error("Couldn't get java.lang.module.ModuleDescriptor#name method");
        return null;
      }
      StringJoiner result = new StringJoiner(",");
      try {
        for (Object moduleRef : moduleRefs) {
          String moduleName = ObjectUtils.tryCast(name.invoke(descriptor.invoke(moduleRef)), String.class);
          if (moduleName == null) return null;
          result.add(moduleName);
        }
      }
      catch (IllegalAccessException | InvocationTargetException e) {
        LOG.error("Couldn't call java.lang.module.ModuleReference#descriptor or name method");
        return null;
      }
      return result.toString();
    }
private static @Nullable String getModulesSequence(@NotNull String artifactOutputPath)