public class NodeClassLoader extends ClassLoader implements INode
| Modifier | Constructor and Description |
|---|---|
protected |
NodeClassLoader(BootClassLoader bootClassLoader,
org.eclipse.aether.graph.DependencyNode node) |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheResourcesHashCode()
In order to have a fast lookup after startup, the node caches the hashcode path of all its resources.
|
protected Class<?> |
findClass(String name)
findClass delegates to a ClassVisitor instance
|
Class<?> |
findClassInNode(String name,
String classFilePath)
Try to load locally the class without any traversing of the graph.
|
protected String |
findLibrary(String libname)
Delegates to a LibraryVisitor
|
String |
findLibraryInNode(String libname)
Try to load locally the library path without any traversing of the graph.
|
protected URL |
findResource(String name)
Delegates to a ResourceVisitor
|
URL |
findResourceInNode(String name)
Try to load locally the resource without any traversing of the graph.
|
protected Enumeration<URL> |
findResources(String name)
Delegates to a BootClassLoader (is it needed?)
|
List<URL> |
findResourcesInNode(String name)
Try to load locally the resource without any traversing of the graph.
|
String |
getArtifactId()
Returns the id of the artifact
|
ClassLoader |
getClassLoader()
Returns classloader of the node, itself
|
NodeClassLoader[] |
getDependencies()
Dependencies of the node
|
Long |
getId()
Returns the unique id of the node
|
URL |
getResource(String name) |
Enumeration<URL> |
getResources(String name)
Delegates to a ResourcesVisitor
|
protected Class<?> |
loadClass(String name,
boolean resolve)
Loading the class consists of first checking in the parent, and if not found traversing the graph
starting by the current node and following its dependencies.
|
String |
toString() |
protected <T> T |
traverse(AbstractVisitor<T> visitor) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignersprotected NodeClassLoader(BootClassLoader bootClassLoader, org.eclipse.aether.graph.DependencyNode node) throws Exception
Exceptionpublic Long getId()
public ClassLoader getClassLoader()
getClassLoader in interface INodepublic String getArtifactId()
public NodeClassLoader[] getDependencies()
INodegetDependencies in interface INodepublic void cacheResourcesHashCode()
cacheResourcesHashCode in interface INodeprotected <T> T traverse(AbstractVisitor<T> visitor)
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionprotected Class<?> findClass(String name) throws ClassNotFoundException
findClass in class ClassLoaderClassNotFoundExceptionpublic Class<?> findClassInNode(String name, String classFilePath) throws Exception
findClassInNode in interface INodename - the class nameclassFilePath - the file path of the classExceptionpublic URL getResource(String name)
getResource in class ClassLoaderprotected URL findResource(String name)
findResource in class ClassLoaderpublic URL findResourceInNode(String name) throws Exception
findResourceInNode in interface INodeExceptionpublic Enumeration<URL> getResources(String name) throws IOException
getResources in class ClassLoaderIOExceptionprotected Enumeration<URL> findResources(String name) throws IOException
findResources in class ClassLoaderIOExceptionpublic List<URL> findResourcesInNode(String name) throws Exception
findResourcesInNode in interface INodeExceptionprotected String findLibrary(String libname)
findLibrary in class ClassLoaderpublic String findLibraryInNode(String libname) throws Exception
findLibraryInNode in interface INodeExceptionCopyright © 2016. All rights reserved.