Class ClassLoaderUtils
java.lang.Object
io.hypersistence.utils.hibernate.util.ClassLoaderUtils
ClassLoaderUtils - Class loading related utilities holder.- Since:
- 2.1.0
- Author:
- Vlad Mihalcea
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanFind if Class denoted by the given string representation is loadablestatic ClassLoaderLoad the available ClassLoaderstatic URLgetResource(String resourceName) Get the resource URLstatic InputStreamgetResourceAsStream(String resourceName) Get the resource InputStreamstatic <T> Class<T>Load the Class denoted by the given string representation
-
Method Details
-
getClassLoader
Load the available ClassLoader- Returns:
- ClassLoader
-
loadClass
Load the Class denoted by the given string representation- Type Parameters:
T- class generic type- Parameters:
className- class string representation- Returns:
- Class
- Throws:
ClassNotFoundException- if the class cannot be resolved
-
findClass
Find if Class denoted by the given string representation is loadable- Parameters:
className- class string representation- Returns:
- Class
-
getResource
Get the resource URL- Parameters:
resourceName- resource name- Returns:
- resource URL
-
getResourceAsStream
Get the resource InputStream- Parameters:
resourceName- resource name- Returns:
- resource InputStream
-