Class ClassUtils

java.lang.Object
org.springframework.integration.util.ClassUtils

public abstract class ClassUtils
extends Object
Since:
2.0
Author:
Mark Fisher, Artem Bilan
  • Field Details

  • Constructor Details

  • Method Details

    • findClosestMatch

      public static Class<?> findClosestMatch​(Class<?> type, Set<Class<?>> candidates, boolean failOnTie)
    • resolvePrimitiveType

      @Nullable public static Class<?> resolvePrimitiveType​(Class<?> clazz)
      Resolve the given class if it is a primitive wrapper class, returning the corresponding primitive type instead.
      Parameters:
      clazz - the wrapper class to check
      Returns:
      the corresponding primitive if the clazz is a wrapper, otherwise null
    • isLambda

      public static boolean isLambda​(Class<?> aClass)
      Check if class is Java lambda.
      Parameters:
      aClass - the Class to check.
      Returns:
      true if class is a Java lambda.
      Since:
      5.2
    • isKotlinFaction0

      public static boolean isKotlinFaction0​(Class<?> aClass)
      Check if class is kotlin.jvm.functions.Function0.
      Parameters:
      aClass - the Class to check.
      Returns:
      true if class is a kotlin.jvm.functions.Function0 implementation.
      Since:
      5.2
    • isKotlinFaction1

      public static boolean isKotlinFaction1​(Class<?> aClass)
      Check if class is kotlin.jvm.functions.Function1.
      Parameters:
      aClass - the Class to check.
      Returns:
      true if class is a kotlin.jvm.functions.Function1 implementation.
      Since:
      5.2
    • isKotlinUnit

      public static boolean isKotlinUnit​(Class<?> aClass)
      Check if class is kotlin.Unit.
      Parameters:
      aClass - the Class to check.
      Returns:
      true if class is a kotlin.Unit implementation.
      Since:
      5.3.2