Package net.bytebuddy.dynamic
Interface NexusAccessor.Dispatcher
-
- All Known Implementing Classes:
NexusAccessor.Dispatcher.Available,NexusAccessor.Dispatcher.Unavailable
- Enclosing class:
- NexusAccessor
protected static interface NexusAccessor.DispatcherA dispatcher for registering type initializers in theNexus.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classNexusAccessor.Dispatcher.AvailableAn enabled dispatcher for registering a type initializer in aNexus.static classNexusAccessor.Dispatcher.CreationActionCreates a new dispatcher for accessing aNexus.static classNexusAccessor.Dispatcher.UnavailableA disabled dispatcher where aNexusis not available.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclean(java.lang.ref.Reference<? extends java.lang.ClassLoader> reference)Cleans any dead entries of the system class loader'sNexus.booleanisAlive()Returnstrueif this dispatcher is alive.voidregister(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()
Returnstrueif this dispatcher is alive.- Returns:
trueif 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, @MaybeNull java.lang.ClassLoader classLoader, @MaybeNull 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 ornullif no queue should be referenced.identification- An identification for the initializer to run.loadedTypeInitializer- The loaded type initializer to be registered.
-
-