/** * Retrieve a switch context for the classloader of a given class * * @deprecated using a class to determine the classloader is a * bad idea, it has the same problems as Class.forName() * @param clazz the class whose classloader should be set * as the context classloader * @return the switch context */ public SwitchContext getSwitchContext(final Class clazz) { return new SwitchContext(clazz.getClassLoader()); }
/** * Retrieve a switch context and set the new context classloader * * @param cl the new classloader * @return the switch context */ public SwitchContext getSwitchContext(final ClassLoader cl) { return new SwitchContext(cl); }
/** * Retrieve a switch context * * @return the switch context */ public SwitchContext getSwitchContext() { return new SwitchContext(); }