class JarAnalyzer implements Callable<FileAnalyzer>, JarEntryWriter, FileAnalyzer {

  public static String getFqClassname(String _jar_entry_name) {
    String cn = null;
    if (_jar_entry_name.endsWith(".class")) {
      // 18.11.2014: Ignore "package-info.class" files, which can contain annotations and
      // documentation
      // 05.12.2017: Ignore "module-info.class" files, which can contain annotations and
      // documentation
      if (!_jar_entry_name.endsWith("package-info.class")
          && !_jar_entry_name.endsWith("module-info.class")) {
        final StringBuffer fqn = new StringBuffer();

        final Path p = Paths.get(_jar_entry_name);
        final Iterator<Path> i = p.iterator();

        while (i.hasNext()) {
          String element = i.next().toString();
          if (element.endsWith(".class"))
            element = element.substring(0, element.length() - 6); // ".class"
          if (JarAnalyzer.isJavaIdentifier(element)) {
            if (fqn.length() != 0) fqn.append('.');
            fqn.append(element);
          } else {
            JarAnalyzer.log.warn(
                "JAR entry ["
                    + _jar_entry_name
                    + "] cannot be transformed to a fully-qualified Java class identifier, because"
                    + " ["
                    + element
                    + "] is not a valid identifier");
            return null;
          }
        }
        cn = fqn.toString();
      }
    }
    return cn;
  }

}