Package net.bytebuddy.dynamic
Interface NexusAccessor.Dispatcher
-
- All Known Implementing Classes:
NexusAccessor.Dispatcher.Available
,NexusAccessor.Dispatcher.Unavailable
- Enclosing class:
- NexusAccessor
protected static interface NexusAccessor.Dispatcher
A dispatcher for registering type initializers in theNexus
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
NexusAccessor.Dispatcher.Available
An enabled dispatcher for registering a type initializer in aNexus
.static class
NexusAccessor.Dispatcher.CreationAction
Creates a new dispatcher for accessing aNexus
.static class
NexusAccessor.Dispatcher.Unavailable
A disabled dispatcher where aNexus
is not available.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clean(java.lang.ref.Reference<? extends java.lang.ClassLoader> reference)
Cleans any dead entries of the system class loader'sNexus
.boolean
isAlive()
Returnstrue
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.
-
-
-
Method Detail
-
isAlive
boolean isAlive()
Returnstrue
if this dispatcher is alive.- Returns:
true
if this dispatcher is alive.
-
clean
void clean(java.lang.ref.Reference<? extends java.lang.ClassLoader> reference)
Cleans any dead entries of the system class loader'sNexus
.- Parameters:
reference
- The reference to remove.
-
register
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.- Parameters:
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 ornull
if no queue should be referenced.identification
- An identification for the initializer to run.loadedTypeInitializer
- The loaded type initializer to be registered.
-
-