public static class ClassFileLocator.AgentBased.ClassLoadingDelegate.Default extends Object implements ClassFileLocator.AgentBased.ClassLoadingDelegate
ClassFileLocator.AgentBased.ClassLoadingDelegate.Default, ClassFileLocator.AgentBased.ClassLoadingDelegate.Explicit, ClassFileLocator.AgentBased.ClassLoadingDelegate.ForDelegatingClassLoader
Modifier and Type | Field and Description |
---|---|
protected ClassLoader |
classLoader
The underlying class loader.
|
Modifier | Constructor and Description |
---|---|
protected |
Default(ClassLoader classLoader)
Creates a default class loading delegate.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
ClassLoader |
getClassLoader()
Returns the underlying class loader.
|
int |
hashCode() |
Class<?> |
locate(String name)
Loads a class by its name.
|
static ClassFileLocator.AgentBased.ClassLoadingDelegate |
of(ClassLoader classLoader)
Creates a class loading delegate for the given class loader.
|
static ClassFileLocator.AgentBased.ClassLoadingDelegate |
of(ClassLoader classLoader,
AccessControlContext accessControlContext)
Creates a class loading delegate for the given class loader.
|
String |
toString() |
protected final ClassLoader classLoader
protected Default(ClassLoader classLoader)
classLoader
- The class loader to be queried.public static ClassFileLocator.AgentBased.ClassLoadingDelegate of(ClassLoader classLoader)
classLoader
- The class loader for which to create a delegate.public static ClassFileLocator.AgentBased.ClassLoadingDelegate of(ClassLoader classLoader, AccessControlContext accessControlContext)
classLoader
- The class loader for which to create a delegate.accessControlContext
- The access control context to use when reading a class from a delegating class loader.public Class<?> locate(String name) throws ClassNotFoundException
ClassFileLocator.AgentBased.ClassLoadingDelegate
locate
in interface ClassFileLocator.AgentBased.ClassLoadingDelegate
name
- The name of the type.ClassNotFoundException
- If a class cannot be found.public ClassLoader getClassLoader()
ClassFileLocator.AgentBased.ClassLoadingDelegate
getClassLoader
in interface ClassFileLocator.AgentBased.ClassLoadingDelegate
Copyright © 2014–2016. All rights reserved.