Class WriterUtils

java.lang.Object
io.micronaut.inject.writer.WriterUtils

@Internal public final class WriterUtils extends Object
The writer utils.
Since:
4.3.0
Author:
Denis Stepanov
  • Constructor Details

    • WriterUtils

      public WriterUtils()
  • Method Details

    • calculateNumberOfKotlinDefaultsMasks

      public static int calculateNumberOfKotlinDefaultsMasks(List<ParameterElement> parameters)
      The number of Kotlin defaults masks.
      Parameters:
      parameters - The parameters
      Returns:
      The number if masks
      Since:
      4.6.2
    • hasKotlinDefaultsParameters

      public static boolean hasKotlinDefaultsParameters(List<ParameterElement> arguments)
      Checks if parameter include Kotlin defaults.
      Parameters:
      arguments - The arguments
      Returns:
      true if include
      Since:
      4.6.2
    • invokeBeanConstructor

      public static void invokeBeanConstructor(org.objectweb.asm.commons.GeneratorAdapter writer, MethodElement constructor, boolean allowKotlinDefaults, @Nullable @Nullable BiConsumer<Integer,ParameterElement> argumentsPusher)
    • invokeBeanConstructor

      public static void invokeBeanConstructor(org.objectweb.asm.commons.GeneratorAdapter writer, MethodElement constructor, boolean requiresReflection, boolean allowKotlinDefaults, @Nullable @Nullable BiConsumer<Integer,ParameterElement> argumentsPusher, @Nullable @Nullable BiFunction<Integer,ParameterElement,Boolean> argumentValueIsPresentPusher)
    • pushDefaultTypeValue

      public static void pushDefaultTypeValue(org.objectweb.asm.commons.GeneratorAdapter writer, ClassElement type)
      Pushed a default value.
      Parameters:
      writer - The writer
      type - The type
    • computeKotlinDefaultsMask

      public static int[] computeKotlinDefaultsMask(org.objectweb.asm.commons.GeneratorAdapter writer, @Nullable @Nullable BiConsumer<Integer,ParameterElement> argumentValuePusher, @Nullable @Nullable BiFunction<Integer,ParameterElement,Boolean> argumentValueIsPresentPusher, List<ParameterElement> parameters)
      Computes Kotlin default method mask.
      Parameters:
      writer - The writer
      argumentValuePusher - The argument value pusher
      argumentValueIsPresentPusher - The argument is present pusher
      parameters - The arguments
      Returns:
      The masks