Package net.bytebuddy.agent.builder
Class AgentBuilder.Default.Transformation.Resolution.Unresolved
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.Default.Transformation.Resolution.Unresolved
-
- All Implemented Interfaces:
AgentBuilder.Default.Transformation.Resolution
- Enclosing interface:
- AgentBuilder.Default.Transformation.Resolution
public static class AgentBuilder.Default.Transformation.Resolution.Unresolved extends java.lang.Object implements AgentBuilder.Default.Transformation.Resolution
A canonical implementation of a non-resolved resolution.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Default.Transformation.Resolution
AgentBuilder.Default.Transformation.Resolution.Decoratable, AgentBuilder.Default.Transformation.Resolution.Sort, AgentBuilder.Default.Transformation.Resolution.Unresolved
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUnresolved(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, boolean loaded)Creates a new unresolved resolution.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 returnsnullif a type is not to be transformed.AgentBuilder.Default.Transformation.ResolutionasDecoratorOf(AgentBuilder.Default.Transformation.Resolution resolution)Resolves this resolution as a decorator of the supplied resolution.AgentBuilder.Default.Transformation.Resolution.SortgetSort()Returns the sort of this resolution.AgentBuilder.Default.Transformation.Resolutionprepend(AgentBuilder.Default.Transformation.Resolution.Decoratable resolution)Resolves this resolution as a decorator of the supplied resolution.
-
-
-
Constructor Detail
-
Unresolved
protected Unresolved(TypeDescription typeDescription, java.lang.ClassLoader classLoader, JavaModule module, boolean loaded)
Creates a new unresolved resolution.- Parameters:
typeDescription- The type that is not transformed.classLoader- The unresolved type's class loader.module- The non-transformed type's module ornullif the current VM does not support modules.loaded-trueif the type is already loaded.
-
-
Method Detail
-
getSort
public AgentBuilder.Default.Transformation.Resolution.Sort getSort()
Description copied from interface:AgentBuilder.Default.Transformation.ResolutionReturns the sort of this resolution.- Specified by:
getSortin interfaceAgentBuilder.Default.Transformation.Resolution- Returns:
- The sort of this resolution.
-
asDecoratorOf
public AgentBuilder.Default.Transformation.Resolution asDecoratorOf(AgentBuilder.Default.Transformation.Resolution resolution)
Description copied from interface:AgentBuilder.Default.Transformation.ResolutionResolves this resolution as a decorator of the supplied resolution.- Specified by:
asDecoratorOfin interfaceAgentBuilder.Default.Transformation.Resolution- Parameters:
resolution- The resolution for which this resolution should serve as a decorator.- Returns:
- A resolution where this resolution is applied as a decorator if this resolution is alive.
-
prepend
public AgentBuilder.Default.Transformation.Resolution prepend(AgentBuilder.Default.Transformation.Resolution.Decoratable resolution)
Description copied from interface:AgentBuilder.Default.Transformation.ResolutionResolves this resolution as a decorator of the supplied resolution.- Specified by:
prependin interfaceAgentBuilder.Default.Transformation.Resolution- Parameters:
resolution- The resolution for which this resolution should serve as a decorator.- Returns:
- A resolution where this resolution is applied as a decorator if this resolution is alive.
-
apply
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)
Description copied from interface:AgentBuilder.Default.Transformation.ResolutionTransforms a type or returnsnullif a type is not to be transformed.- Specified by:
applyin interfaceAgentBuilder.Default.Transformation.Resolution- Parameters:
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.- Returns:
- The class file of the transformed class or
nullif no transformation is attempted.
-
-