Top Description Fields Constructors Methods
org.junit.platform.commons.util

public Class KotlinReflectionUtils

extends Object
Class Inheritance
Annotations
@API
status:INTERNAL
since:1.13.3
Static Imports
org.apiguardian.api.API.Status.INTERNAL, org.junit.platform.commons.util.ReflectionUtils.EMPTY_CLASS_ARRAY, .ReflectionUtils.findMethod, .ReflectionUtils.isStatic, .ReflectionUtils.tryToLoadClass

Internal Kotlin-specific reflection utilities
Since
1.13.3

Field Summary

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static Class<?>[]
copyWithoutFirst(Class<?>[] values)

public static Type
public static Parameter[]
public static Class<?>[]
public static Class<?>
public static @Nullable Object
private static boolean
isCompilerGeneratedDefaultMethod(Method method, Class<?> enclosingClass)

public static boolean
isKotlinInterfaceDefaultImplsClass(Class<?> clazz)

Determines whether the supplied class is a DefaultImpls class generated by the Kotlin compiler.

public static boolean
private static boolean
isKotlinType(Class<?> clazz)

private static void
requireDependency(Method method, boolean condition, String dependencyNotation)

private static void
private static void
private static Try<Class<? extends Annotation>>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_IMPLS_CLASS_NAMEback to summary
private static final String DEFAULT_IMPLS_CLASS_NAME
kotlinCoroutineContinuationback to summary
private static final @Nullable Class<?> kotlinCoroutineContinuation
kotlinMetadataback to summary
private static final @Nullable Class<? extends Annotation> kotlinMetadata
kotlinReflectPresentback to summary
private static final boolean kotlinReflectPresent
kotlinxCoroutinesPresentback to summary
private static final boolean kotlinxCoroutinesPresent

Constructor Detail

KotlinReflectionUtilsback to summary
private KotlinReflectionUtils()

Method Detail

copyWithoutFirstback to summary
private static Class<?>[] copyWithoutFirst(Class<?>[] values)
getKotlinSuspendingFunctionGenericReturnTypeback to summary
public static Type getKotlinSuspendingFunctionGenericReturnType(Method method)
getKotlinSuspendingFunctionParametersback to summary
public static Parameter[] getKotlinSuspendingFunctionParameters(Method method)
getKotlinSuspendingFunctionParameterTypesback to summary
public static Class<?>[] getKotlinSuspendingFunctionParameterTypes(Method method)
getKotlinSuspendingFunctionReturnTypeback to summary
public static Class<?> getKotlinSuspendingFunctionReturnType(Method method)
invokeKotlinSuspendingFunctionback to summary
public static @Nullable Object invokeKotlinSuspendingFunction(Method method, @Nullable Object target, @Nullable Object[] args)
isCompilerGeneratedDefaultMethodback to summary
private static boolean isCompilerGeneratedDefaultMethod(Method method, Class<?> enclosingClass)
isKotlinInterfaceDefaultImplsClassback to summary
public static boolean isKotlinInterfaceDefaultImplsClass(Class<?> clazz)

Determines whether the supplied class is a DefaultImpls class generated by the Kotlin compiler.

See Kotlin documentation for details.

isKotlinSuspendingFunctionback to summary
public static boolean isKotlinSuspendingFunction(Method method)
Annotations
@API
status:INTERNAL
since:6.0
Since
6.0
isKotlinTypeback to summary
private static boolean isKotlinType(Class<?> clazz)
requireDependencyback to summary
private static void requireDependency(Method method, boolean condition, String dependencyNotation)
requireKotlinReflectback to summary
private static void requireKotlinReflect(Method method)
requireKotlinxCoroutinesback to summary
private static void requireKotlinxCoroutines(Method method)
tryToLoadKotlinMetadataClassback to summary
private static Try<Class<? extends Annotation>> tryToLoadKotlinMetadataClass()
Annotations
@SuppressWarnings:unchecked