Nexus
such that it can be seen by all class loaders of
a virtual machine. Furthermore, it provides an API to access this global instance.
Modifier and Type | Class and Description |
---|---|
protected static interface | NexusAccessor.Dispatcher
A dispatcher for registering type initializers in the |
public static class | NexusAccessor.InitializationAppender
An initialization appender that looks up a loaded type initializer from Byte Buddy's |
Modifier and Type | Field and Description |
---|---|
private static final NexusAccessor. | DISPATCHER
The dispatcher to use. |
private final ReferenceQueue | referenceQueue
The reference queue that is notified upon a GC eligible |
Access | Constructor and Description |
---|---|
public | NexusAccessor()
Creates a new accessor for the |
public | NexusAccessor(ReferenceQueue<? super ClassLoader>
The reference queue onto which stale references should be enqueued or referenceQueue)null if no reference queue
should be notified.Creates a new accessor for a |
Modifier and Type | Method and Description |
---|---|
public static void | clean(Reference<? extends ClassLoader>
The reference to remove. References are collected via a reference queue that is supplied to the reference)NexusAccessor .Removes a stale entries that are registered in the |
private static < The type of the action's resolved value. T> T | Returns: The action's resolved value.The action to execute from a privileged context. action)A proxy for |
public static boolean | Returns: true if this accessor is alive.Checks if this |
public void | register(String
The binary name of the class. name, ClassLoader The class's class loader. classLoader, int The id used for identifying the loaded type initializer that was added to the identification, LoadedTypeInitializer Nexus .The loaded type initializer to make available via the loadedTypeInitializer)Nexus .Registers a loaded type initializer in Byte Buddy's |
DISPATCHER | back to summary |
---|---|
private static final NexusAccessor. The dispatcher to use. |
referenceQueue | back to summary |
---|---|
private final ReferenceQueue<? super ClassLoader> referenceQueue The reference queue that is notified upon a GC eligible |
NexusAccessor | back to summary |
---|---|
public NexusAccessor() Creates a new accessor for the |
NexusAccessor | back to summary |
---|---|
public NexusAccessor(ReferenceQueue<? super ClassLoader> referenceQueue) Creates a new accessor for a
|
clean | back to summary |
---|---|
public static void clean(Reference<? extends ClassLoader> reference) Removes a stale entries that are registered in the
|
doPrivileged | back to summary |
---|---|
private static <T> T doPrivileged(PrivilegedAction<T> action) A proxy for
|
isAlive | back to summary |
---|---|
public static boolean isAlive() Checks if this
|
register | back to summary |
---|---|
public void register(String name, ClassLoader classLoader, int identification, LoadedTypeInitializer loadedTypeInitializer) Registers a loaded type initializer in Byte Buddy's
|
Nexus
.
Modifier and Type | Class and Description |
---|---|
public static class | NexusAccessor.Dispatcher.Available
An enabled dispatcher for registering a type initializer in a |
public static enum | NexusAccessor.Dispatcher.CreationAction
Creates a new dispatcher for accessing a |
public static class | NexusAccessor.Dispatcher.Unavailable
A disabled dispatcher where a |
Modifier and Type | Method and Description |
---|---|
public void | clean(Reference<? extends ClassLoader>
The reference to remove. reference)Cleans any dead entries of the system class loader's |
public boolean | |
public void | register(String
The name of a type for which a loaded type initializer is registered. name, ClassLoader The class loader for which a loaded type initializer is registered. classLoader, ReferenceQueue<? super ClassLoader> A reference queue to notify about stale nexus entries or referenceQueue, int null if no queue should be referenced.An identification for the initializer to run. identification, LoadedTypeInitializer The loaded type initializer to be registered. loadedTypeInitializer)Registers a type initializer with the system class loader's nexus. |
clean | back to summary |
---|---|
public void clean(Reference<? extends ClassLoader> reference) Cleans any dead entries of the system class loader's
|
isAlive | back to summary |
---|---|
public boolean isAlive() Returns
|
register | back to summary |
---|---|
public 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.
|
Nexus
.
Modifier and Type | Field and Description |
---|---|
private final Method | clean
The |
private final Method |
Access | Constructor and Description |
---|---|
protected |
Modifier and Type | Method and Description |
---|---|
public void | clean(Reference<? extends ClassLoader>
The reference to remove. reference)Implements net. Nexus .
|
public boolean | isAlive()
Implements net. true if this dispatcher is alive.
|
public void | register(String
The name of a type for which a loaded type initializer is registered. name, ClassLoader The class loader for which a loaded type initializer is registered. classLoader, ReferenceQueue<? super ClassLoader> A reference queue to notify about stale nexus entries or referenceQueue, int null if no queue should be referenced.An identification for the initializer to run. identification, LoadedTypeInitializer The loaded type initializer to be registered. loadedTypeInitializer)Implements net. |
clean | back to summary |
---|---|
private final Method clean The |
register | back to summary |
---|---|
private final Method register The |
Available | back to summary |
---|---|
protected Available(Method register, Method clean) Creates a new dispatcher.
|
clean | back to summary |
---|---|
public void clean(Reference<? extends ClassLoader> reference) Implements net. Doc from net. Cleans any dead entries of the system class loader's
|
isAlive | back to summary |
---|---|
public boolean isAlive() Implements net. Doc from net. Returns
|
register | back to summary |
---|---|
public void register(String name, ClassLoader classLoader, ReferenceQueue<? super ClassLoader> referenceQueue, int identification, LoadedTypeInitializer loadedTypeInitializer) Implements net. Doc from net. Registers a type initializer with the system class loader's nexus.
|
Nexus
.
Modifier and Type | Field and Description |
---|---|
public static final NexusAccessor. | INSTANCE
The singleton instance. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public NexusAccessor. | |
public static NexusAccessor. | |
public static NexusAccessor. |
INSTANCE | back to summary |
---|---|
public static final NexusAccessor. The singleton instance. |
CreationAction | back to summary |
---|---|
private CreationAction() |
run | back to summary |
---|---|
public NexusAccessor. Implements java. Doc from java. Performs the computation. This method will be called by
|
valueOf | back to summary |
---|---|
public static NexusAccessor. |
values | back to summary |
---|---|
public static NexusAccessor. |
Nexus
.
Modifier and Type | Field and Description |
---|---|
private final int | identification
The id used for identifying the loaded type initializer that was added to the |
Access | Constructor and Description |
---|---|
public | InitializationAppender(int
The id used for identifying the loaded type initializer that was added to the identification)Nexus .Creates a new initialization appender. |
Modifier and Type | Method and Description |
---|---|
public ByteCodeAppender. | apply(MethodVisitor
The method visitor to which the byte code appender writes its code to. methodVisitor, Implementation.The implementation context of the current type creation process. implementationContext,The method that is the target of the instrumentation. instrumentedMethod)Implements net. |
identification | back to summary |
---|---|
private final int identification The id used for identifying the loaded type initializer that was added to the |
InitializationAppender | back to summary |
---|---|
public InitializationAppender(int identification) Creates a new initialization appender.
|
apply | back to summary |
---|---|
public ByteCodeAppender. Implements net. Doc from net. Applies this byte code appender to a type creation process.
|