Class TypeProxy.ForDefaultMethod

java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
net.bytebuddy.implementation.auxiliary.TypeProxy.ForDefaultMethod
All Implemented Interfaces:
StackManipulation
Enclosing class:
TypeProxy

@Enhance public static class TypeProxy.ForDefaultMethod extends StackManipulation.AbstractBase
Creates a type proxy which delegates its super method calls to any invokable default method of a given interface and loads an instance of this proxy onto the operand stack.
  • Field Details

    • proxiedType

      private final TypeDescription proxiedType
      The proxied interface type.
    • implementationTarget

      private final Implementation.Target implementationTarget
      The implementation target for the original instrumentation.
    • serializableProxy

      private final boolean serializableProxy
      true if the proxy should be Serializable.
  • Constructor Details

    • ForDefaultMethod

      public ForDefaultMethod(TypeDescription proxiedType, Implementation.Target implementationTarget, boolean serializableProxy)
      Creates a new proxy creation for a default interface type proxy.
      Parameters:
      proxiedType - The proxied interface type.
      implementationTarget - The implementation target for the original implementation.
      serializableProxy - true if the proxy should be Serializable.
  • Method Details

    • apply

      public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)
      Applies the stack manipulation that is described by this instance.
      Parameters:
      methodVisitor - The method visitor used to write the method implementation to.
      implementationContext - The context of the current implementation.
      Returns:
      The changes to the size of the operand stack that are implied by this stack manipulation.