public class Loader extends Object
public class MyClass { void myMethod() { ... Class c=Loader.loadClass(this.getClass(),classname); ... }
Constructor and Description |
---|
Loader() |
Modifier and Type | Method and Description |
---|---|
static String |
getClassPath(ClassLoader loader)
Generate the classpath (as a string) of all classloaders
above the given classloader.
|
static URL |
getResource(Class<?> loadClass,
String name) |
static ResourceBundle |
getResourceBundle(Class<?> loadClass,
String name,
boolean checkParents,
Locale locale) |
static Class |
loadClass(Class loadClass,
String name)
Load a class.
|
public static Class loadClass(Class loadClass, String name) throws ClassNotFoundException
loadClass
- name
- ClassNotFoundException
public static ResourceBundle getResourceBundle(Class<?> loadClass, String name, boolean checkParents, Locale locale) throws MissingResourceException
MissingResourceException
public static String getClassPath(ClassLoader loader) throws Exception
Exception
Copyright © 1995-2015 Webtide. All Rights Reserved.