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

    • FUNCTION_APPLY_METHOD

      public static final Method FUNCTION_APPLY_METHOD
      The Function.apply(Object) method object.
    • SUPPLIER_GET_METHOD

      public static final Method SUPPLIER_GET_METHOD
      The Supplier.get() method object.
    • SELECTOR_ACCEPT_METHOD

      public static final Method SELECTOR_ACCEPT_METHOD
      The org.springframework.integration.core.GenericSelector#accept(Object) method object.
    • TRANSFORMER_TRANSFORM_METHOD

      public static final Method TRANSFORMER_TRANSFORM_METHOD
      The org.springframework.integration.transformer.GenericTransformer#transform(Object) method object.
    • HANDLER_HANDLE_METHOD

      public static final Method HANDLER_HANDLE_METHOD
      The org.springframework.integration.handler.GenericHandler#handle(Object, Map) method object.
    • KOTLIN_FUNCTION_0_CLASS

      public static final Class<?> KOTLIN_FUNCTION_0_CLASS
      The kotlin.jvm.functions.Function0 class object.
    • KOTLIN_FUNCTION_0_INVOKE_METHOD

      public static final Method KOTLIN_FUNCTION_0_INVOKE_METHOD
      The kotlin.jvm.functions.Function0#invoke method object.
    • KOTLIN_FUNCTION_1_CLASS

      public static final Class<?> KOTLIN_FUNCTION_1_CLASS
      The kotlin.jvm.functions.Function1 class object.
    • KOTLIN_UNIT_CLASS

      public static final Class<?> KOTLIN_UNIT_CLASS
      The kotlin.Unit class object.
  • Constructor Details

    • ClassUtils

      public ClassUtils()
  • 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 or Kotlin lambda.
      Parameters:
      aClass - the Class to check.
      Returns:
      true if class is a Java or Kotlin lambda.
      Since:
      5.2
    • isKotlinFunction0

      public static boolean isKotlinFunction0(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.5.14
    • isKotlinFunction1

      public static boolean isKotlinFunction1(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.5.14
    • 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