Class NexusAccessor.Dispatcher.Unavailable
java.lang.Object
net.bytebuddy.dynamic.NexusAccessor.Dispatcher.Unavailable
- All Implemented Interfaces:
NexusAccessor.Dispatcher
- Enclosing interface:
NexusAccessor.Dispatcher
@Enhance
public static class NexusAccessor.Dispatcher.Unavailable
extends Object
implements NexusAccessor.Dispatcher
A disabled dispatcher where a
Nexus is not available.-
Nested Class Summary
Nested classes/interfaces inherited from interface NexusAccessor.Dispatcher
NexusAccessor.Dispatcher.Available, NexusAccessor.Dispatcher.CreationAction, NexusAccessor.Dispatcher.Unavailable -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUnavailable(String message) Creates a new unavailable dispatcher. -
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.
-
Field Details
-
message
The reason for the dispatcher being unavailable.
-
-
Constructor Details
-
Unavailable
Creates a new unavailable dispatcher.- Parameters:
message- The reason for the dispatcher being unavailable.
-
-
Method Details
-
isAlive
public boolean isAlive()Returnstrueif this dispatcher is alive.- Specified by:
isAlivein interfaceNexusAccessor.Dispatcher- Returns:
trueif this dispatcher is alive.
-
clean
Cleans any dead entries of the system class loader'sNexus.- Specified by:
cleanin interfaceNexusAccessor.Dispatcher- Parameters:
reference- The reference to remove.
-
register
public 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.- Specified by:
registerin interfaceNexusAccessor.Dispatcher- 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.
-