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 TypeMethodDescriptionvoidclean(Reference<? extends ClassLoader> reference) Cleans any dead entries of the system class loader'sNexus.booleanisAlive()Returnstrueif this dispatcher is alive.voidregister(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()Returnstrueif this dispatcher is alive.- Returns:
trueif 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 ornullif no queue should be referenced.identification- An identification for the initializer to run.loadedTypeInitializer- The loaded type initializer to be registered.
-