Top Description Fields Constructors Methods
org.springframework.core

public abstract Class KotlinDetector

extends Object
Class Inheritance
Annotations
@SuppressWarnings:unchecked
Imports
java.lang.annotation.Annotation, java.lang.reflect.Method, org.springframework.lang.Nullable, org.springframework.util.ClassUtils

A common delegate for detecting Kotlin's presence and for identifying Kotlin types.
Authors
Juergen Hoeller, Sebastien Deleuze
Since
5.0

Field Summary

Modifier and TypeField and Description
private static final Class<? extends Annotation>
private static final boolean
private static final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean
isKotlinPresent()

Determine whether Kotlin is present in general.

public static boolean
isKotlinReflectPresent()

Determine whether Kotlin reflection is present.

public static boolean
isKotlinType(Class<?> clazz)

Determine whether the given Class is a Kotlin type (with Kotlin metadata present on it).

public static boolean
isSuspendingFunction(Method method)

Return true if the method is a suspending function.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

kotlinMetadataback to summary
private static final Class<? extends Annotation> kotlinMetadata
Annotations
@Nullable
kotlinPresentback to summary
private static final boolean kotlinPresent
kotlinReflectPresentback to summary
private static final boolean kotlinReflectPresent

Constructor Detail

KotlinDetectorback to summary
public KotlinDetector()

Method Detail

isKotlinPresentback to summary
public static boolean isKotlinPresent()

Determine whether Kotlin is present in general.

isKotlinReflectPresentback to summary
public static boolean isKotlinReflectPresent()

Determine whether Kotlin reflection is present.

Since
5.1
isKotlinTypeback to summary
public static boolean isKotlinType(Class<?> clazz)

Determine whether the given Class is a Kotlin type (with Kotlin metadata present on it).

isSuspendingFunctionback to summary
public static boolean isSuspendingFunction(Method method)

Return true if the method is a suspending function.

Since
5.3