public class Loader extends URLClassLoader
| Modifier and Type | Class and Description |
|---|---|
static class |
Loader.NondelegatingLoader
Version of bind-on-demand loader which will not delegate handling of
classes included in the binding definition.
|
| Constructor and Description |
|---|
Loader()
Default constructor.
|
Loader(URL[] paths)
Constructor with classpath URLs supplied.
|
Loader(URL[] paths,
ClassLoader parent)
Constructor with classpath URLs and parent classloader supplied.
|
| Modifier and Type | Method and Description |
|---|---|
protected Class |
findClass(String name)
Find and load class by name.
|
static URL[] |
getClassPaths()
Method builds an array of URL for items in the class path.
|
protected boolean |
isBoundClass(String name)
Check if a class has been modified by a binding.
|
void |
loadBinding(String fname,
String sname,
InputStream is,
URL url)
Load binding definition.
|
void |
loadFileBinding(String path)
Load binding definition from file path.
|
void |
loadResourceBinding(String path)
Load binding definition from file path.
|
void |
processBindings()
Process the binding definitions.
|
void |
reset()
Reset loader information.
|
addURL, close, definePackage, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic Loader(URL[] paths, ClassLoader parent)
paths - array of classpath URLsparent - classloader used for delegation loadingpublic Loader(URL[] paths)
paths - array of classpath URLspublic Loader()
throws MalformedURLException
MalformedURLException - on error in classpath URLspublic void reset()
public static URL[] getClassPaths() throws MalformedURLException
MalformedURLException - URL Exceptionpublic void loadBinding(String fname, String sname, InputStream is, URL url) throws org.jibx.runtime.JiBXException, IOException
fname - binding definition full namesname - short form of name to use as the default name of the bindingis - input stream for binding definition documenturl - URL for binding definition (null if not
available)IllegalStateException - if called after bindings have been
compiledIOException - if error reading the bindingorg.jibx.runtime.JiBXException - if error in processing the binding definitionpublic void loadFileBinding(String path) throws org.jibx.runtime.JiBXException, IOException
path - binding definition file pathIllegalStateException - if called after bindings have been
compiledIOException - if error reading the fileorg.jibx.runtime.JiBXException - if error in processing the binding definitionpublic void loadResourceBinding(String path) throws org.jibx.runtime.JiBXException, IOException
path - binding definition file pathIllegalStateException - if called after bindings have been
compiledIOException - if error reading the fileorg.jibx.runtime.JiBXException - if error in processing the binding definitionpublic void processBindings()
throws org.jibx.runtime.JiBXException
org.jibx.runtime.JiBXException - if error in processing the binding definitionprotected boolean isBoundClass(String name)
name - fully qualified package and class name to be foundtrue if class modified by binding,
false if notprotected Class findClass(String name) throws ClassNotFoundException
findClass in class URLClassLoadername - fully qualified package and class name to be foundClassNotFoundException - if the class cannot be foundClassLoader.findClass(java.lang.String)Copyright © 2005–2016 jibx.org. All rights reserved.