Class KotlinDefaultMask

java.lang.Object
org.springframework.data.mapping.model.KotlinDefaultMask

public class KotlinDefaultMask extends Object
Value object representing defaulting masks used for Kotlin methods applying parameter defaulting.
Since:
2.1
Author:
Mark Paluch
  • Method Details

    • forEach

      public void forEach(IntConsumer maskCallback)
      Callback method to notify IntConsumer for each defaulting mask.
      Parameters:
      maskCallback - must not be null.
    • getMaskCount

      public static int getMaskCount(int arguments)
      Return the number of defaulting masks required to represent the number of arguments.
      Parameters:
      arguments - number of method arguments.
      Returns:
      the number of defaulting masks required. Returns at least one to be used with copy methods.
    • from

      public static KotlinDefaultMask from(kotlin.reflect.KFunction<?> function, Predicate<kotlin.reflect.KParameter> isPresent)
      Creates defaulting mask(s) used to invoke Kotlin default methods that conditionally apply parameter values.
      Parameters:
      function - the KFunction that should be invoked.
      isPresent - Predicate for the presence/absence of parameters.
      Returns:
      KotlinDefaultMask.
    • getDefaulting

      public int[] getDefaulting()