Package com.regnosys.rosetta.common.util
Class ClassPathUtils
java.lang.Object
com.regnosys.rosetta.common.util.ClassPathUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpandPaths(Collection<Path> paths, String includeRegex, Optional<String> excludeRegex) findPathsFromClassPath(Collection<String> classPathDirectories, String includeRegex, Optional<String> excludeRegex, ClassLoader classLoader) Searches the class path for given directories and returns all files contained in the directory and sub directories filtered by the regexes.Includes basictypes.rosetta and annotations.rosettastatic URLgetResource(Path path) static URLgetResource(Path path, ClassLoader classLoader) loadFromClasspath(String path) loadFromClasspath(String path, ClassLoader classLoader) static Pathstatic PathloadSingleFromClasspath(String path, ClassLoader classLoader)
-
Constructor Details
-
ClassPathUtils
public ClassPathUtils()
-
-
Method Details
-
findPathsFromClassPath
public static List<Path> findPathsFromClassPath(Collection<String> classPathDirectories, String includeRegex, Optional<String> excludeRegex, ClassLoader classLoader) Searches the class path for given directories and returns all files contained in the directory and sub directories filtered by the regexes.- Parameters:
classPathDirectories- List of all the directories to search for in the class path loader.includeRegex- Regex file pattern to search files on.excludeRegex- Regex file pattern to exclude files on.classLoader- Classloader to search in.- Returns:
-
findRosettaFilePaths
-
findStaticRosettaFilePaths
Includes basictypes.rosetta and annotations.rosetta -
expandPaths
-
getResource
-
getResource
-
loadFromClasspath
-
loadFromClasspath
-
loadSingleFromClasspath
-
loadSingleFromClasspath
-