Package rife.bld.extension.tools
Class ClasspathTools
java.lang.Object
rife.bld.extension.tools.ClasspathTools
Classpath Tools.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringjoinClasspath(String... paths) Join string paths into a single classpath by concatenating non-blank paths using the system's path separator.static StringjoinClasspath(Collection<File>... files) Joins multiple collections of file paths into a single classpath string using the system's path separator.
-
Method Details
-
joinClasspath
Join string paths into a single classpath by concatenating non-blank paths using the system's path separator.Blank or
nullpaths are ignored.- Parameters:
paths- An array of strings representing individual classpath entries.nullor 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
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.
nullcollections are safely ignored.- Parameters:
files- Variable number ofCollections ofFileobjects representing the files to include in the classpath.nullcollections are skipped. If all collections are empty ornull, 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
-