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 Summary
Fields Modifier and Type Field Description static Method
FUNCTION_APPLY_METHOD
TheFunction.apply(Object)
method object.static Method
HANDLER_HANDLE_METHOD
Theorg.springframework.integration.handler.GenericHandler#handle(Object, Map)
method object.static Class<?>
KOTLIN_FUNCTION_0_CLASS
Thekotlin.jvm.functions.Function0
class object.static Method
KOTLIN_FUNCTION_0_INVOKE_METHOD
Thekotlin.jvm.functions.Function0#invoke
method object.static Class<?>
KOTLIN_FUNCTION_1_CLASS
Thekotlin.jvm.functions.Function1
class object.static Class<?>
KOTLIN_UNIT_CLASS
Thekotlin.Unit
class object.static Method
SELECTOR_ACCEPT_METHOD
Theorg.springframework.integration.core.GenericSelector#accept(Object)
method object.static Method
SUPPLIER_GET_METHOD
TheSupplier.get()
method object.static Method
TRANSFORMER_TRANSFORM_METHOD
Theorg.springframework.integration.transformer.GenericTransformer#transform(Object)
method object. -
Constructor Summary
Constructors Constructor Description ClassUtils()
-
Method Summary
Modifier and Type Method Description static Class<?>
findClosestMatch(Class<?> type, Set<Class<?>> candidates, boolean failOnTie)
static boolean
isKotlinFaction0(Class<?> aClass)
Check if class iskotlin.jvm.functions.Function0
.static boolean
isKotlinFaction1(Class<?> aClass)
Check if class iskotlin.jvm.functions.Function1
.static boolean
isKotlinUnit(Class<?> aClass)
Check if class iskotlin.Unit
.static boolean
isLambda(Class<?> aClass)
Check if class is Java lambda.static Class<?>
resolvePrimitiveType(Class<?> clazz)
Resolve the given class if it is a primitive wrapper class, returning the corresponding primitive type instead.
-
Field Details
-
FUNCTION_APPLY_METHOD
TheFunction.apply(Object)
method object. -
SUPPLIER_GET_METHOD
TheSupplier.get()
method object. -
SELECTOR_ACCEPT_METHOD
Theorg.springframework.integration.core.GenericSelector#accept(Object)
method object. -
TRANSFORMER_TRANSFORM_METHOD
Theorg.springframework.integration.transformer.GenericTransformer#transform(Object)
method object. -
HANDLER_HANDLE_METHOD
Theorg.springframework.integration.handler.GenericHandler#handle(Object, Map)
method object. -
KOTLIN_FUNCTION_0_CLASS
Thekotlin.jvm.functions.Function0
class object. -
KOTLIN_FUNCTION_0_INVOKE_METHOD
Thekotlin.jvm.functions.Function0#invoke
method object. -
KOTLIN_FUNCTION_1_CLASS
Thekotlin.jvm.functions.Function1
class object. -
KOTLIN_UNIT_CLASS
Thekotlin.Unit
class object.
-
-
Constructor Details
-
ClassUtils
public ClassUtils()
-
-
Method Details
-
findClosestMatch
-
resolvePrimitiveType
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
Check if class is Java lambda.- Parameters:
aClass
- theClass
to check.- Returns:
- true if class is a Java lambda.
- Since:
- 5.2
-
isKotlinFaction0
Check if class iskotlin.jvm.functions.Function0
.- Parameters:
aClass
- theClass
to check.- Returns:
- true if class is a
kotlin.jvm.functions.Function0
implementation. - Since:
- 5.2
-
isKotlinFaction1
Check if class iskotlin.jvm.functions.Function1
.- Parameters:
aClass
- theClass
to check.- Returns:
- true if class is a
kotlin.jvm.functions.Function1
implementation. - Since:
- 5.2
-
isKotlinUnit
Check if class iskotlin.Unit
.- Parameters:
aClass
- theClass
to check.- Returns:
- true if class is a
kotlin.Unit
implementation. - Since:
- 5.3.2
-