/** * Loads a class * * @param className - the class to fetch * @return The loaded class * @throws ClassNotFoundException If the class cannot be found (duh!) */ public static Class<?> classForName(String className) throws ClassNotFoundException { return classLoaderWrapper.classForName(className); }
public static Class<?> classForName(String className) throws ClassNotFoundException { return classLoaderWrapper.classForName(className); }
/** * Find a class on the classpath (or die trying) * * @param name - the class to look for * @return - the class * @throws ClassNotFoundException Duh. */ public Class<?> classForName(String name) throws ClassNotFoundException { return classForName(name, getClassLoaders(null)); }
/** * Find a class on the classpath, starting with a specific classloader (or die trying) * * @param name - the class to look for * @param classLoader - the first classloader to try * @return - the class * @throws ClassNotFoundException Duh. */ public Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException { return classForName(name, getClassLoaders(classLoader)); }
public Class<?> classForName(String name) throws ClassNotFoundException { return classForName(name, getClassLoaders(null)); }
public Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException { return classForName(name, getClassLoaders(classLoader)); }
/** * Loads a class * * @param className - the class to fetch * @return The loaded class * @throws ClassNotFoundException If the class cannot be found (duh!) */ public static Class classForName(String className) throws ClassNotFoundException { return classLoaderWrapper.classForName(className); }
/** * Find a class on the classpath (or die trying) * * @param name - the class to look for * @return - the class * @throws ClassNotFoundException Duh. */ public Class classForName(String name) throws ClassNotFoundException { return classForName(name, new ClassLoader[]{ defaultClassLoader, Thread.currentThread().getContextClassLoader(), getClass().getClassLoader(), ClassLoader.getSystemClassLoader() }); }
/** * Find a class on the classpath, starting with a specific classloader (or die trying) * * @param name - the class to look for * @param classLoader - the first classloader to try * @return - the class * @throws ClassNotFoundException Duh. */ public Class classForName(String name, ClassLoader classLoader) throws ClassNotFoundException { return classForName(name, new ClassLoader[]{ classLoader, defaultClassLoader, Thread.currentThread().getContextClassLoader(), getClass().getClassLoader(), ClassLoader.getSystemClassLoader() }); }