public final class X4OLanguageClassLoader extends Object
| Modifier and Type | Method and Description |
|---|---|
static ClassLoader |
getClassLoader()
Gets the thread classloader or the normal classloader.
|
static URL |
getResource(String resourceName)
Gets a resource from the classloader to an url.
|
static InputStream |
getResourceAsStream(String resourceName)
Gets a resource from the classloader to an inputstream.
|
static Class<?> |
loadClass(String className)
Loads a Class from the ContextClassLoader and if that is not set, then
uses the class of the String className instance.
|
static Object |
newInstance(Class<?> clazz)
Creates new instance of clazz.
|
static Object |
newInstance(String className)
Creates new instance of className.
|
public static ClassLoader getClassLoader()
public static Class<?> loadClass(String className) throws ClassNotFoundException
className - The class name to loadClassNotFoundException - if class not loaded.public static Object newInstance(Class<?> clazz) throws InstantiationException, IllegalAccessException
clazz - The class to make object from.InstantiationException - When className has no default constructor.IllegalAccessException - When class loading has security error.public static Object newInstance(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException
className - The className to create object from.ClassNotFoundException - When className is not found.InstantiationException - When className has no default constructor.IllegalAccessException - When class loading has security error.public static URL getResource(String resourceName)
resourceName - The resource to get from the classloader.ClassLoader.getResource(String)public static InputStream getResourceAsStream(String resourceName)
resourceName - The resource to get from the classloader.ClassLoader.getResourceAsStream(String)Copyright © 2004-2013 X4O. All Rights Reserved.