Class AgentBuilder.Transformer.ForAdvice.LazyDynamicType

java.lang.Object
net.bytebuddy.dynamic.DynamicType.AbstractBase
net.bytebuddy.agent.builder.AgentBuilder.Transformer.ForAdvice.LazyDynamicType
All Implemented Interfaces:
Closeable, AutoCloseable, ClassFileLocator, DynamicType
Enclosing class:
AgentBuilder.Transformer.ForAdvice

@Enhance protected static class AgentBuilder.Transformer.ForAdvice.LazyDynamicType extends DynamicType.AbstractBase
A lazy dynamic type that only loads a class file representation on demand.
  • Field Details

    • typeDescription

      private final TypeDescription typeDescription
      A description of the class to inject.
    • classFileLocator

      private final ClassFileLocator classFileLocator
      The class file locator to use.
  • Constructor Details

    • LazyDynamicType

      protected LazyDynamicType(TypeDescription typeDescription, ClassFileLocator classFileLocator)
      Creates a lazy dynamic type.
      Parameters:
      typeDescription - A description of the class to inject.
      classFileLocator - The class file locator to use.
  • Method Details

    • getTypeDescription

      public TypeDescription getTypeDescription()

      Returns a description of this dynamic type.

      Note: This description will most likely differ from the binary representation of this type. Normally, annotations and intercepted methods are not added to this type description.

      Returns:
      A description of this dynamic type.
    • getBytes

      public byte[] getBytes()
      Returns a byte array representing this dynamic type. This byte array might be reused by this dynamic type and must therefore not be altered.
      Returns:
      A byte array of the type's binary representation.
    • getAuxiliaries

      public List<? extends DynamicType> getAuxiliaries()
      Returns all auxiliary types of this dynamic type.
      Returns:
      A list of all auxiliary types of this dynamic type.
    • getLoadedTypeInitializer

      public LoadedTypeInitializer getLoadedTypeInitializer()
      Returns the loaded type initializer of this dynamic type.
      Returns:
      The loaded type initializer of this dynamic type.