1 17 18 21 package org.quartz.simpl; 22 23 import org.quartz.spi.ClassLoadHelper; 24 25 import java.net.URL ; 26 import java.io.InputStream ; 27 28 40 public class ThreadContextClassLoadHelper implements ClassLoadHelper { 41 42 49 50 55 public void initialize() { 56 } 57 58 61 public Class loadClass(String name) throws ClassNotFoundException { 62 return getClassLoader().loadClass(name); 63 } 64 65 71 public URL getResource(String name) { 72 return getClassLoader().getResource(name); 73 } 74 75 81 public InputStream getResourceAsStream(String name) { 82 return getClassLoader().getResourceAsStream(name); 83 } 84 85 86 private ClassLoader getClassLoader() { 87 return Thread.currentThread().getContextClassLoader(); 88 } 89 } 90 | Popular Tags |