public static interface AgentBuilder.Default.InitializationStrategy
LoadedTypeInitializers.| Modifier and Type | Interface and Description |
|---|---|
static class |
AgentBuilder.Default.InitializationStrategy.NoOp
A non-initializing initialization strategy.
|
static class |
AgentBuilder.Default.InitializationStrategy.SelfInjection
An initialization strategy that adds a code block to an instrumented type's type initializer which
then calls a specific class that is responsible for the explicit initialization.
|
| Modifier and Type | Method and Description |
|---|---|
DynamicType.Builder<?> |
apply(DynamicType.Builder<?> builder)
Transforms the instrumented type to implement an appropriate initialization strategy.
|
void |
initialize(Class<?> type,
LoadedTypeInitializer loadedTypeInitializer)
Determines if and how a loaded type initializer is to be applied to a loaded type.
|
void |
register(String name,
ClassLoader classLoader,
LoadedTypeInitializer loadedTypeInitializer)
Registers a loaded type initializer for a type name and class loader pair.
|
void initialize(Class<?> type, LoadedTypeInitializer loadedTypeInitializer)
type - The loaded type.loadedTypeInitializer - The type's loaded type initializer.DynamicType.Builder<?> apply(DynamicType.Builder<?> builder)
builder - The builder which should implement the initialization strategy.builder with the initialization strategy applied.void register(String name, ClassLoader classLoader, LoadedTypeInitializer loadedTypeInitializer)
name - The name of the type for which the loaded type initializer is to be
registered.classLoader - The class loader of the instrumented type. Might be null if
this class loader represents the bootstrap class loader.loadedTypeInitializer - The loaded type initializer that is being registered.Copyright © 2014–2015. All rights reserved.