@HashCodeAndEqualsPlugin.Enhance protected static class AgentBuilder.Default.Transformation.Simple.Resolution extends java.lang.Object implements AgentBuilder.Default.Transformation.Resolution.Decoratable
Modifier and Type | Class and Description |
---|---|
protected static class |
AgentBuilder.Default.Transformation.Simple.Resolution.BootstrapClassLoaderCapableInjectorFactory
An injector factory that resolves to a bootstrap class loader injection if this is necessary and enabled.
|
AgentBuilder.Default.Transformation.Resolution.Decoratable, AgentBuilder.Default.Transformation.Resolution.Sort, AgentBuilder.Default.Transformation.Resolution.Unresolved
Modifier and Type | Field and Description |
---|---|
private java.lang.ClassLoader |
classLoader
The class loader of the transformed type.
|
private boolean |
decorator
true if this transformer serves as a decorator. |
private boolean |
loaded
true if the transformed type is already loaded. |
private JavaModule |
module
The transformed type's module or
null if the current VM does not support modules. |
private java.security.ProtectionDomain |
protectionDomain
The protection domain of the transformed type.
|
private AgentBuilder.Transformer |
transformer
The transformer to be applied.
|
private TypeDescription |
typeDescription
A description of the transformed type.
|
private TypePool |
typePool
The type pool to apply during type creation.
|
Modifier | Constructor and Description |
---|---|
protected |
Resolution(TypeDescription typeDescription,
java.lang.ClassLoader classLoader,
JavaModule module,
java.security.ProtectionDomain protectionDomain,
boolean loaded,
TypePool typePool,
AgentBuilder.Transformer transformer,
boolean decorator)
Creates a new active transformation.
|
Modifier and Type | Method and Description |
---|---|
AgentBuilder.Default.Transformation.Resolution |
append(AgentBuilder.Transformer transformer)
Appends the supplied transformer to this resolution.
|
byte[] |
apply(AgentBuilder.InitializationStrategy initializationStrategy,
ClassFileLocator classFileLocator,
AgentBuilder.TypeStrategy typeStrategy,
ByteBuddy byteBuddy,
AgentBuilder.Default.NativeMethodStrategy methodNameTransformer,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
java.security.AccessControlContext accessControlContext,
AgentBuilder.Listener listener)
Transforms a type or returns
null if a type is not to be transformed. |
AgentBuilder.Default.Transformation.Resolution |
asDecoratorOf(AgentBuilder.Default.Transformation.Resolution resolution)
Resolves this resolution as a decorator of the supplied resolution.
|
AgentBuilder.Default.Transformation.Resolution.Sort |
getSort()
Returns the sort of this resolution.
|
AgentBuilder.Default.Transformation.Resolution |
prepend(AgentBuilder.Default.Transformation.Resolution.Decoratable resolution)
Resolves this resolution as a decorator of the supplied resolution.
|
private final TypeDescription typeDescription
private final java.lang.ClassLoader classLoader
private final JavaModule module
null
if the current VM does not support modules.private final java.security.ProtectionDomain protectionDomain
private final boolean loaded
true
if the transformed type is already loaded.private final TypePool typePool
private final AgentBuilder.Transformer transformer
private final boolean decorator
true
if this transformer serves as a decorator.protected Resolution(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, java.security.ProtectionDomain protectionDomain, boolean loaded, TypePool typePool, AgentBuilder.Transformer transformer, boolean decorator)
typeDescription
- A description of the transformed type.classLoader
- The class loader of the transformed type.module
- The transformed type's module or null
if the current VM does not support modules.protectionDomain
- The protection domain of the transformed type.loaded
- true
if the transformed type is already loaded.typePool
- The type pool to apply during type creation.transformer
- The transformer to be applied.decorator
- true
if this transformer serves as a decorator.public AgentBuilder.Default.Transformation.Resolution.Sort getSort()
getSort
in interface AgentBuilder.Default.Transformation.Resolution
public AgentBuilder.Default.Transformation.Resolution asDecoratorOf(AgentBuilder.Default.Transformation.Resolution resolution)
asDecoratorOf
in interface AgentBuilder.Default.Transformation.Resolution
resolution
- The resolution for which this resolution should serve as a decorator.public AgentBuilder.Default.Transformation.Resolution prepend(AgentBuilder.Default.Transformation.Resolution.Decoratable resolution)
prepend
in interface AgentBuilder.Default.Transformation.Resolution
resolution
- The resolution for which this resolution should serve as a decorator.public AgentBuilder.Default.Transformation.Resolution append(AgentBuilder.Transformer transformer)
append
in interface AgentBuilder.Default.Transformation.Resolution.Decoratable
transformer
- The transformer to append to the transformer that is represented bz this instance.public byte[] apply(AgentBuilder.InitializationStrategy initializationStrategy, ClassFileLocator classFileLocator, AgentBuilder.TypeStrategy typeStrategy, ByteBuddy byteBuddy, AgentBuilder.Default.NativeMethodStrategy methodNameTransformer, AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy, java.security.AccessControlContext accessControlContext, AgentBuilder.Listener listener)
null
if a type is not to be transformed.apply
in interface AgentBuilder.Default.Transformation.Resolution
initializationStrategy
- The initialization strategy to use.classFileLocator
- The class file locator to use.typeStrategy
- The definition handler to use.byteBuddy
- The Byte Buddy instance to use.methodNameTransformer
- The method name transformer to be used.bootstrapInjectionStrategy
- The bootstrap injection strategy to be used.accessControlContext
- The access control context to be used.listener
- The listener to be invoked to inform about an applied or non-applied transformation.null
if no transformation is attempted.