Class JavaDispatcher.Dispatcher.ForDefaultValue.OfNonPrimitiveArray

java.lang.Object
net.bytebuddy.utility.dispatcher.JavaDispatcher.Dispatcher.ForDefaultValue.OfNonPrimitiveArray
All Implemented Interfaces:
JavaDispatcher.Dispatcher
Enclosing class:
JavaDispatcher.Dispatcher.ForDefaultValue

@Enhance protected static class JavaDispatcher.Dispatcher.ForDefaultValue.OfNonPrimitiveArray extends Object implements JavaDispatcher.Dispatcher
A dispatcher for a non-primitive array type.
  • Field Details

    • value

      @ValueHandling(IGNORE) private final Object value
      The default value.
    • componentType

      private final Class<?> componentType
      The represented component type.
  • Constructor Details

    • OfNonPrimitiveArray

      protected OfNonPrimitiveArray(Object value, Class<?> componentType)
      Creates a new dispatcher for the default value of a non-primitive array.
      Parameters:
      value - The default value.
      componentType - The represented component type.
  • Method Details

    • of

      protected static JavaDispatcher.Dispatcher of(Class<?> componentType)
      Creates a new dispatcher.
      Parameters:
      componentType - The represented component type.
      Returns:
      A dispatcher for the supplied component type.
    • invoke

      public Object invoke(Object[] argument)
      Invokes the proxied action.
      Specified by:
      invoke in interface JavaDispatcher.Dispatcher
      Parameters:
      argument - The arguments provided.
      Returns:
      The return value.
    • apply

      public int apply(org.objectweb.asm.MethodVisitor methodVisitor, Method method)
      Implements this dispatcher in a generated proxy.
      Specified by:
      apply in interface JavaDispatcher.Dispatcher
      Parameters:
      methodVisitor - The method visitor to implement the method with.
      method - The method being implemented.
      Returns:
      The maximal size of the operand stack.