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 the
Nexus
.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
clean
(Reference<? extends ClassLoader> reference) Cleans any dead entries of the system class loader'sNexus
.boolean
isAlive()
Returnstrue
if this dispatcher is alive.void
register
(String name, ClassLoader classLoader, ReferenceQueue<? super ClassLoader> referenceQueue, int identification, LoadedTypeInitializer loadedTypeInitializer) Registers a type initializer with the system class loader's nexus.
-
Method Details
-
isAlive
boolean isAlive()Returnstrue
if this dispatcher is alive.- Returns:
true
if this dispatcher is alive.
-
clean
Cleans any dead entries of the system class loader'sNexus
.- Parameters:
reference
- The reference to remove.
-
register
void register(String name, @MaybeNull ClassLoader classLoader, @MaybeNull ReferenceQueue<? super 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.
-