Package net.bytebuddy.dynamic
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 java.lang.Object implements NexusAccessor.Dispatcher
A disabled dispatcher where aNexus
is not available.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.NexusAccessor.Dispatcher
NexusAccessor.Dispatcher.Available, NexusAccessor.Dispatcher.CreationAction, NexusAccessor.Dispatcher.Unavailable
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
message
The reason for the dispatcher being unavailable.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Unavailable(java.lang.String message)
Creates a new unavailable dispatcher.
-
Method Summary
All Methods Instance Methods Concrete 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
public boolean isAlive()
Returnstrue
if this dispatcher is alive.- Specified by:
isAlive
in interfaceNexusAccessor.Dispatcher
- Returns:
true
if this dispatcher is alive.
-
clean
public void clean(java.lang.ref.Reference<? extends java.lang.ClassLoader> reference)
Cleans any dead entries of the system class loader'sNexus
.- Specified by:
clean
in interfaceNexusAccessor.Dispatcher
- Parameters:
reference
- The reference to remove.
-
register
public 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.- Specified by:
register
in 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 ornull
if no queue should be referenced.identification
- An identification for the initializer to run.loadedTypeInitializer
- The loaded type initializer to be registered.
-
-