@HashCodeAndEqualsPlugin.Enhance public static class NexusAccessor.Dispatcher.Available extends java.lang.Object implements NexusAccessor.Dispatcher
Nexus
.NexusAccessor.Dispatcher.Available, NexusAccessor.Dispatcher.CreationAction, NexusAccessor.Dispatcher.Unavailable
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
clean
The
Nexus.clean(Reference) method. |
private java.lang.reflect.Method |
register
|
private static java.lang.Object |
STATIC_METHOD
Indicates that a static method is invoked by reflection.
|
Modifier | Constructor and Description |
---|---|
protected |
Available(java.lang.reflect.Method register,
java.lang.reflect.Method clean)
Creates a new dispatcher.
|
Modifier and Type | Method and Description |
---|---|
void |
clean(java.lang.ref.Reference<? extends java.lang.ClassLoader> reference)
Cleans any dead entries of the system class loader's
Nexus . |
boolean |
isAlive()
Returns
true if this dispatcher is alive. |
void |
register(java.lang.String name,
java.lang.ClassLoader classLoader,
java.lang.ref.ReferenceQueue<? super java.lang.ClassLoader> referenceQueue,
int identification,
LoadedTypeInitializer loadedTypeInitializer)
Registers a type initializer with the system class loader's nexus.
|
private static final java.lang.Object STATIC_METHOD
private final java.lang.reflect.Method register
private final java.lang.reflect.Method clean
Nexus.clean(Reference)
method.protected Available(java.lang.reflect.Method register, java.lang.reflect.Method clean)
register
- The Nexus.register(String, ClassLoader, ReferenceQueue, int, Object)
method.clean
- The Nexus.clean(Reference)
method.public boolean isAlive()
true
if this dispatcher is alive.isAlive
in interface NexusAccessor.Dispatcher
true
if this dispatcher is alive.public void clean(java.lang.ref.Reference<? extends java.lang.ClassLoader> reference)
Nexus
.clean
in interface NexusAccessor.Dispatcher
reference
- The reference to remove.public void register(java.lang.String name, java.lang.ClassLoader classLoader, java.lang.ref.ReferenceQueue<? super java.lang.ClassLoader> referenceQueue, int identification, LoadedTypeInitializer loadedTypeInitializer)
register
in interface NexusAccessor.Dispatcher
name
- The name of a type for which a loaded type initializer is registered.classLoader
- The class loader for which a loaded type initializer is registered.referenceQueue
- A reference queue to notify about stale nexus entries or null
if no queue should be referenced.identification
- An identification for the initializer to run.loadedTypeInitializer
- The loaded type initializer to be registered.