Package com.avoka.core.util
Class ClassloaderUtils
java.lang.Object
com.avoka.core.util.ClassloaderUtils
Provides a class loader utility.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
findResourcePaths
(String resourcePath) Provides debugging information about the classloader for the resources.static void
findResourcePaths
(String resourcePath, Class localClass) For debugging purposes.static String
getClasspathResource
(String resourcePath, Class localClass) Return the text content for the given class path resource and class.
-
Constructor Details
-
ClassloaderUtils
public ClassloaderUtils()
-
-
Method Details
-
findResourcePaths
Provides debugging information about the classloader for the resources.- Parameters:
resourcePath
- the resource which shall be located
-
findResourcePaths
For debugging purposes. This attempts to load the specified resource (e.g. "javax/jws/WebService.class") using the thread local, system and class-specific class loader and writes the findings to System.out This can be used to investigate whether multiple versions of a resource are visible to the classloader- Parameters:
resourcePath
- the resource which shall be locatedlocalClass
- the class to get the class-specific classloader for
-
getClasspathResource
Return the text content for the given class path resource and class.- Parameters:
resourcePath
- the class path resource (required)localClass
- the local class (optional)- Returns:
- the text content for the given class path resource and class
- Since:
- 4.3.2
-