public class ClassUtils extends Object
Class.forName(className);This utility attempts to load the class or resource using a number of different mechanisms to work around this problem.
Modifier and Type | Method and Description |
---|---|
static Class |
forName(String className)
Loads the class with the specified name.
|
static InputStream |
getResourceAsStream(String name)
Loads the given resource as a stream.
|
Class |
loadClass(String className) |
public static Class forName(String className) throws ClassNotFoundException
className
- the name of the classClass
objectClassNotFoundException
- if the class was not foundpublic static InputStream getResourceAsStream(String name)
name
- the name of the resource that exists in the classpath.public Class loadClass(String className) throws ClassNotFoundException
ClassNotFoundException
Copyright © 2003-2008 Jive Software.