Package io.micronaut.inject.writer
Class WriterUtils
java.lang.Object
io.micronaut.inject.writer.WriterUtils
The writer utils.
- Since:
- 4.3.0
- Author:
- Denis Stepanov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
calculateNumberOfKotlinDefaultsMasks
(List<ParameterElement> parameters) The number of Kotlin defaults masks.static int[]
computeKotlinDefaultsMask
(org.objectweb.asm.commons.GeneratorAdapter writer, @Nullable BiConsumer<Integer, ParameterElement> argumentValuePusher, @Nullable BiFunction<Integer, ParameterElement, Boolean> argumentValueIsPresentPusher, List<ParameterElement> parameters) Computes Kotlin default method mask.static boolean
hasKotlinDefaultsParameters
(List<ParameterElement> arguments) Checks if parameter include Kotlin defaults.static void
invokeBeanConstructor
(org.objectweb.asm.commons.GeneratorAdapter writer, MethodElement constructor, boolean requiresReflection, boolean allowKotlinDefaults, @Nullable BiConsumer<Integer, ParameterElement> argumentsPusher, @Nullable BiFunction<Integer, ParameterElement, Boolean> argumentValueIsPresentPusher) static void
invokeBeanConstructor
(org.objectweb.asm.commons.GeneratorAdapter writer, MethodElement constructor, boolean allowKotlinDefaults, @Nullable BiConsumer<Integer, ParameterElement> argumentsPusher) static void
pushDefaultTypeValue
(org.objectweb.asm.commons.GeneratorAdapter writer, ClassElement type) Pushed a default value.
-
Constructor Details
-
WriterUtils
public WriterUtils()
-
-
Method Details
-
calculateNumberOfKotlinDefaultsMasks
The number of Kotlin defaults masks.- Parameters:
parameters
- The parameters- Returns:
- The number if masks
- Since:
- 4.6.2
-
hasKotlinDefaultsParameters
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 writertype
- 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 writerargumentValuePusher
- The argument value pusherargumentValueIsPresentPusher
- The argument is present pusherparameters
- The arguments- Returns:
- The masks
-