程序包 com.sh.util.io
类 ClassLoaderWrapper
java.lang.Object
com.sh.util.io.ClassLoaderWrapper
Description:
Title:首亨软件 - TSS/CRM等
- 从以下版本开始:
- 2014年11月11日
-
方法概要
修饰符和类型方法说明Class<?>classForName(String name) Find a class on the classpath (or die trying)Class<?>classForName(String name, ClassLoader classLoader) Find a class on the classpath, starting with a specific classloader (or die trying)getResourceAsStream(String resource) Get a resource from the classpathgetResourceAsStream(String resource, ClassLoader classLoader) Get a resource from the classpath, starting with a specific class loadergetResourceAsURL(String resource) Get a resource as a URL using the current class pathgetResourceAsURL(String resource, ClassLoader classLoader) Get a resource from the classpath, starting with a specific class loader
-
方法详细资料
-
getResourceAsURL
Get a resource as a URL using the current class path- 参数:
resource- the resource to locate- 返回:
- the resource or null
-
getResourceAsURL
Get a resource from the classpath, starting with a specific class loader- 参数:
resource- the resource to findclassLoader- the first classloader to try- 返回:
- the stream or null
-
getResourceAsStream
Get a resource from the classpath- 参数:
resource- the resource to find- 返回:
- the stream or null
-
getResourceAsStream
Get a resource from the classpath, starting with a specific class loader- 参数:
resource- the resource to findclassLoader- the first class loader to try- 返回:
- the stream or null
-
classForName
Find a class on the classpath (or die trying)- 参数:
name- the class to look for- 返回:
- the class
- 抛出:
ClassNotFoundException- ClassNotFoundException
-
classForName
Find a class on the classpath, starting with a specific classloader (or die trying)- 参数:
name- the class to look forclassLoader- the first classloader to try- 返回:
- the class
- 抛出:
ClassNotFoundException- ClassNotFoundException
-