test_class.file: shared/src/test/java/org/eclipse/steady/shared/util/FileUtilTest.java
test_class.identifier: FileUtilTest
test_case.body: @Test
    public void testGetJarFilePaths() {
      // As of Java 9, the system class loader is no longer a URLClassLoader
      // https://stackoverflow.com/questions/46694600/java-9-compatability-issue-with-classloader-getsystemclassloader
      // https://blog.codefx.org/java/java-9-migration-guide/#Casting-To-URL-Class-Loader
      final ClassLoader cl = FileUtil.class.getClassLoader();
      if (cl instanceof URLClassLoader) {
        final Set<String> jars = FileUtil.getJarFilePaths((URLClassLoader) cl);
        assertTrue(!jars.isEmpty());
      }
    }
test_case.class_method_signature: FileUtilTest.testGetJarFilePaths()
test_case.full_signature: @Test public void testGetJarFilePaths()
test_case.identifier: testGetJarFilePaths
test_case.invocations: getClassLoader getJarFilePaths assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetJarFilePaths()
focal_class.declarator: log = org.apache.logging.log4j.LogManager.getLogger()
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = org.apache.logging.log4j.LogManager.getLogger();
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: shared/src/main/java/org/eclipse/steady/shared/util/FileUtil.java
focal_class.identifier: FileUtil
focal_class.class_method_signature: FileUtil.getFileExtension(File _file)
focal_class.full_signature: public static String getFileExtension(File _file)
focal_class.identifier: getFileExtension
focal_class.modifiers: public static
focal_class.parameters: (File _file)
focal_class.return: String
focal_class.signature: String getFileExtension(File _file)
focal_class.class_method_signature: FileUtil.hasFileExtension(Path _p, String[] _extensions)
focal_class.full_signature: public static boolean hasFileExtension(Path _p, String[] _extensions)
focal_class.identifier: hasFileExtension
focal_class.modifiers: public static
focal_class.parameters: (Path _p, String[] _extensions)
focal_class.return: boolean
focal_class.signature: boolean hasFileExtension(Path _p, String[] _extensions)
focal_class.class_method_signature: FileUtil.toString(Set<Path> _paths, String _sep)
focal_class.full_signature: public static String toString(Set<Path> _paths, String _sep)
focal_class.identifier: toString
focal_class.modifiers: public static
focal_class.parameters: (Set<Path> _paths, String _sep)
focal_class.return: String
focal_class.signature: String toString(Set<Path> _paths, String _sep)
focal_class.class_method_signature: FileUtil.createTmpDir(String _prefix)
focal_class.full_signature: public static Path createTmpDir(String _prefix)
focal_class.identifier: createTmpDir
focal_class.modifiers: public static
focal_class.parameters: (String _prefix)
focal_class.return: Path
focal_class.signature: Path createTmpDir(String _prefix)
focal_class.class_method_signature: FileUtil.isAccessibleFile(String _arg)
focal_class.full_signature: public static boolean isAccessibleFile(String _arg)
focal_class.identifier: isAccessibleFile
focal_class.modifiers: public static
focal_class.parameters: (String _arg)
focal_class.return: boolean
focal_class.signature: boolean isAccessibleFile(String _arg)
focal_class.class_method_signature: FileUtil.isAccessibleFile(Path _arg)
focal_class.full_signature: public static boolean isAccessibleFile(Path _arg)
focal_class.identifier: isAccessibleFile
focal_class.modifiers: public static
focal_class.parameters: (Path _arg)
focal_class.return: boolean
focal_class.signature: boolean isAccessibleFile(Path _arg)
focal_class.class_method_signature: FileUtil.isAccessibleDirectory(Path _dir)
focal_class.full_signature: public static final boolean isAccessibleDirectory(Path _dir)
focal_class.identifier: isAccessibleDirectory
focal_class.modifiers: public static final
focal_class.parameters: (Path _dir)
focal_class.return: boolean
focal_class.signature: boolean isAccessibleDirectory(Path _dir)
focal_class.class_method_signature: FileUtil.isAccessibleDirectory(File _dir)
focal_class.full_signature: public static final boolean isAccessibleDirectory(File _dir)
focal_class.identifier: isAccessibleDirectory
focal_class.modifiers: public static final
focal_class.parameters: (File _dir)
focal_class.return: boolean
focal_class.signature: boolean isAccessibleDirectory(File _dir)
focal_class.class_method_signature: FileUtil.isAccessibleDirectory(String _dir)
focal_class.full_signature: public static final boolean isAccessibleDirectory(String _dir)
focal_class.identifier: isAccessibleDirectory
focal_class.modifiers: public static final
focal_class.parameters: (String _dir)
focal_class.return: boolean
focal_class.signature: boolean isAccessibleDirectory(String _dir)
focal_class.class_method_signature: FileUtil.createDirectory(Path _p)
focal_class.full_signature: public static final void createDirectory(Path _p)
focal_class.identifier: createDirectory
focal_class.modifiers: public static final
focal_class.parameters: (Path _p)
focal_class.return: void
focal_class.signature: void createDirectory(Path _p)
focal_class.class_method_signature: FileUtil.getFileName(String _file_path)
focal_class.full_signature: public static String getFileName(String _file_path)
focal_class.identifier: getFileName
focal_class.modifiers: public static
focal_class.parameters: (String _file_path)
focal_class.return: String
focal_class.signature: String getFileName(String _file_path)
focal_class.class_method_signature: FileUtil.getFileName(String _file_path, boolean _keep_ext)
focal_class.full_signature: public static String getFileName(String _file_path, boolean _keep_ext)
focal_class.identifier: getFileName
focal_class.modifiers: public static
focal_class.parameters: (String _file_path, boolean _keep_ext)
focal_class.return: String
focal_class.signature: String getFileName(String _file_path, boolean _keep_ext)
focal_class.class_method_signature: FileUtil.getCharsetName()
focal_class.full_signature: public static String getCharsetName()
focal_class.identifier: getCharsetName
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getCharsetName()
focal_class.class_method_signature: FileUtil.getCharset()
focal_class.full_signature: public static Charset getCharset()
focal_class.identifier: getCharset
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Charset
focal_class.signature: Charset getCharset()
focal_class.class_method_signature: FileUtil.copyFile(Path _source_file, Path _target_dir)
focal_class.full_signature: public static Path copyFile(Path _source_file, Path _target_dir)
focal_class.identifier: copyFile
focal_class.modifiers: public static
focal_class.parameters: (Path _source_file, Path _target_dir)
focal_class.return: Path
focal_class.signature: Path copyFile(Path _source_file, Path _target_dir)
focal_class.class_method_signature: FileUtil.readFile(String _p)
focal_class.full_signature: public static String readFile(String _p)
focal_class.identifier: readFile
focal_class.modifiers: public static
focal_class.parameters: (String _p)
focal_class.return: String
focal_class.signature: String readFile(String _p)
focal_class.class_method_signature: FileUtil.readFile(Path _p)
focal_class.full_signature: public static String readFile(Path _p)
focal_class.identifier: readFile
focal_class.modifiers: public static
focal_class.parameters: (Path _p)
focal_class.return: String
focal_class.signature: String readFile(Path _p)
focal_class.class_method_signature: FileUtil.readInputStream(InputStream _is, Charset _cs)
focal_class.full_signature: public static String readInputStream(InputStream _is, Charset _cs)
focal_class.identifier: readInputStream
focal_class.modifiers: public static
focal_class.parameters: (InputStream _is, Charset _cs)
focal_class.return: String
focal_class.signature: String readInputStream(InputStream _is, Charset _cs)
focal_class.class_method_signature: FileUtil.readInputStream(InputStream _is)
focal_class.full_signature: public static byte[] readInputStream(InputStream _is)
focal_class.identifier: readInputStream
focal_class.modifiers: public static
focal_class.parameters: (InputStream _is)
focal_class.return: byte[]
focal_class.signature: byte[] readInputStream(InputStream _is)
focal_class.class_method_signature: FileUtil.writeToFile(File _f, String _content)
focal_class.full_signature: public static final void writeToFile(File _f, String _content)
focal_class.identifier: writeToFile
focal_class.modifiers: public static final
focal_class.parameters: (File _f, String _content)
focal_class.return: void
focal_class.signature: void writeToFile(File _f, String _content)
focal_class.class_method_signature: FileUtil.writeToTmpFile(String _filename, String _suffix, String _content)
focal_class.full_signature: public static final Path writeToTmpFile(String _filename, String _suffix, String _content)
focal_class.identifier: writeToTmpFile
focal_class.modifiers: public static final
focal_class.parameters: (String _filename, String _suffix, String _content)
focal_class.return: Path
focal_class.signature: Path writeToTmpFile(String _filename, String _suffix, String _content)
focal_class.class_method_signature: FileUtil.writeToFile(File _f, byte[] _content)
focal_class.full_signature: public static final void writeToFile(File _f, byte[] _content)
focal_class.identifier: writeToFile
focal_class.modifiers: public static final
focal_class.parameters: (File _f, byte[] _content)
focal_class.return: void
focal_class.signature: void writeToFile(File _f, byte[] _content)
focal_class.class_method_signature: FileUtil.getPaths(String[] _paths)
focal_class.full_signature: public static Set<Path> getPaths(String[] _paths)
focal_class.identifier: getPaths
focal_class.modifiers: public static
focal_class.parameters: (String[] _paths)
focal_class.return: Set<Path>
focal_class.signature: Set<Path> getPaths(String[] _paths)
focal_class.class_method_signature: FileUtil.getPath(String _path, boolean _create)
focal_class.full_signature: public static Path getPath(String _path, boolean _create)
focal_class.identifier: getPath
focal_class.modifiers: public static
focal_class.parameters: (String _path, boolean _create)
focal_class.return: Path
focal_class.signature: Path getPath(String _path, boolean _create)
focal_class.class_method_signature: FileUtil.getPath(String _path)
focal_class.full_signature: public static Path getPath(String _path)
focal_class.identifier: getPath
focal_class.modifiers: public static
focal_class.parameters: (String _path)
focal_class.return: Path
focal_class.signature: Path getPath(String _path)
focal_class.class_method_signature: FileUtil.getSHA1(File _file)
focal_class.full_signature: public static final String getSHA1(File _file)
focal_class.identifier: getSHA1
focal_class.modifiers: public static final
focal_class.parameters: (File _file)
focal_class.return: String
focal_class.signature: String getSHA1(File _file)
focal_class.class_method_signature: FileUtil.getDigest(File _file, DigestAlgorithm _alg)
focal_class.full_signature: public static final String getDigest(File _file, DigestAlgorithm _alg)
focal_class.identifier: getDigest
focal_class.modifiers: public static final
focal_class.parameters: (File _file, DigestAlgorithm _alg)
focal_class.return: String
focal_class.signature: String getDigest(File _file, DigestAlgorithm _alg)
focal_class.class_method_signature: FileUtil.getJarFilePath(Class<?> _clazz)
focal_class.full_signature: public static String getJarFilePath(Class<?> _clazz)
focal_class.identifier: getJarFilePath
focal_class.modifiers: public static
focal_class.parameters: (Class<?> _clazz)
focal_class.return: String
focal_class.signature: String getJarFilePath(Class<?> _clazz)
focal_class.class_method_signature: FileUtil.getJarFilePath(String _url)
focal_class.full_signature: public static String getJarFilePath(String _url)
focal_class.identifier: getJarFilePath
focal_class.modifiers: public static
focal_class.parameters: (String _url)
focal_class.return: String
focal_class.signature: String getJarFilePath(String _url)
focal_class.class_method_signature: FileUtil.getJarFilePathsForResources(ClassLoader _cl, String[] _resources)
focal_class.full_signature: public static Set<String> getJarFilePathsForResources(ClassLoader _cl, String[] _resources)
focal_class.identifier: getJarFilePathsForResources
focal_class.modifiers: public static
focal_class.parameters: (ClassLoader _cl, String[] _resources)
focal_class.return: Set<String>
focal_class.signature: Set<String> getJarFilePathsForResources(ClassLoader _cl, String[] _resources)
focal_class.class_method_signature: FileUtil.getJarFilePaths(URLClassLoader _cl)
focal_class.full_signature: public static Set<String> getJarFilePaths(URLClassLoader _cl)
focal_class.identifier: getJarFilePaths
focal_class.modifiers: public static
focal_class.parameters: (URLClassLoader _cl)
focal_class.return: Set<String>
focal_class.signature: Set<String> getJarFilePaths(URLClassLoader _cl)
focal_class.class_method_signature: FileUtil.isZipped(File _f)
focal_class.full_signature: public static Boolean isZipped(File _f)
focal_class.identifier: isZipped
focal_class.modifiers: public static
focal_class.parameters: (File _f)
focal_class.return: Boolean
focal_class.signature: Boolean isZipped(File _f)
focal_method.body: public static Set<String> getJarFilePaths(URLClassLoader _cl) {
      final Set<String> jar_paths = new HashSet<String>();
      final URL[] urls = _cl.getURLs();
      log.info(
          "Class loader search path contains ["
              + urls.length
              + "] items: Search for configurations in JAR files");
      for (int i = 0; i < urls.length; i++) {
        final String jar_path = FileUtil.getJarFilePath(urls[i].toString());
        if (jar_path != null) {
          jar_paths.add(jar_path);
        }
      }
      return jar_paths;
    }
focal_method.class_method_signature: FileUtil.getJarFilePaths(URLClassLoader _cl)
focal_method.full_signature: public static Set<String> getJarFilePaths(URLClassLoader _cl)
focal_method.identifier: getJarFilePaths
focal_method.invocations: getURLs info getJarFilePath toString add
focal_method.modifiers: public static
focal_method.parameters: (URLClassLoader _cl)
focal_method.return: Set<String>
focal_method.signature: Set<String> getJarFilePaths(URLClassLoader _cl)