Class ClasspathTools

java.lang.Object
rife.bld.extension.tools.ClasspathTools

public final class ClasspathTools extends Object
Classpath Tools.
  • Method Details

    • joinClasspath

      public static String joinClasspath(String... paths)
      Join string paths into a single classpath by concatenating non-blank paths using the system's path separator.

      Blank or null paths are ignored.

      Parameters:
      paths - An array of strings representing individual classpath entries. null or blank strings are skipped in the final classpath
      Returns:
      A string representing the concatenated classpath entries, separated by the system's path separator. If no valid paths are provided, an empty string is returned
      Since:
      1.0
    • joinClasspath

      @SafeVarargs public static String joinClasspath(Collection<File>... files)
      Joins multiple collections of file paths into a single classpath string using the system's path separator.

      Each file's absolute path from all provided collections is included in the resulting classpath string. null collections are safely ignored.

      Parameters:
      files - Variable number of Collections of File objects representing the files to include in the classpath. null collections are skipped. If all collections are empty or null, an empty string is returned
      Returns:
      A classpath string where the absolute paths of all provided files are joined by the system's path separator. If no valid files are provided, an empty string is returned
      Since:
      1.0