public class ClassLoaderWrapper extends Object
| Modifier and Type | Method and Description |
|---|---|
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)
|
InputStream |
getResourceAsStream(String resource)
Get a resource from the classpath
|
InputStream |
getResourceAsStream(String resource,
ClassLoader classLoader)
Get a resource from the classpath, starting with a specific class loader
|
URL |
getResourceAsURL(String resource)
Get a resource as a URL using the current class path
|
URL |
getResourceAsURL(String resource,
ClassLoader classLoader)
Get a resource from the classpath, starting with a specific class loader
|
public URL getResourceAsURL(String resource)
resource - - the resource to locatepublic URL getResourceAsURL(String resource, ClassLoader classLoader)
resource - - the resource to findclassLoader - - the first classloader to trypublic InputStream getResourceAsStream(String resource)
resource - - the resource to findpublic InputStream getResourceAsStream(String resource, ClassLoader classLoader)
resource - - the resource to findclassLoader - - the first class loader to trypublic Class<?> classForName(String name) throws ClassNotFoundException
name - - the class to look forClassNotFoundException - Duh.public Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException
name - - the class to look forclassLoader - - the first classloader to tryClassNotFoundException - Duh.Copyright © 2009–2021 MyBatis.org. All rights reserved.