public final class ClassUtils extends Object
| Constructor and Description |
|---|
ClassUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
findClass(String name)
This is same as
Class.forName(String) but throws
IllegalArgumentException if class is not found. |
static URL |
getResource(String name)
Finds the resource with the given name.
|
static InputStream |
getResourceStream(String name)
Returns an input stream for reading the specified resource.
|
public static Class<?> findClass(String name)
Class.forName(String) but throws
IllegalArgumentException if class is not found.name - name of the class to look forpublic static URL getResource(String name)
name - The resource nameURL for reading the resource or nullClassLoader.getResource(String)public static InputStream getResourceStream(String name)
name - The resource nameClassLoader.getResourceAsStream(String)