Package kotlin.jvm.internal
Class Reflection
- java.lang.Object
-
- kotlin.jvm.internal.Reflection
-
public class Reflection extends java.lang.Object
This class serves as a facade to the actual reflection implementation. JVM back-end generates calls to static methods of this class on any reflection-using construct.
-
-
Constructor Summary
Constructors Constructor Description Reflection()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static kotlin.reflect.KClass
createKotlinClass(java.lang.Class javaClass)
static kotlin.reflect.KClass
createKotlinClass(java.lang.Class javaClass, java.lang.String internalName)
static kotlin.reflect.KFunction
function(FunctionReference f)
static kotlin.reflect.KClass
getOrCreateKotlinClass(java.lang.Class javaClass)
static kotlin.reflect.KClass
getOrCreateKotlinClass(java.lang.Class javaClass, java.lang.String internalName)
static kotlin.reflect.KClass[]
getOrCreateKotlinClasses(java.lang.Class[] javaClasses)
static kotlin.reflect.KDeclarationContainer
getOrCreateKotlinPackage(java.lang.Class javaClass)
static kotlin.reflect.KDeclarationContainer
getOrCreateKotlinPackage(java.lang.Class javaClass, java.lang.String moduleName)
static kotlin.reflect.KType
mutableCollectionType(kotlin.reflect.KType type)
static kotlin.reflect.KMutableProperty0
mutableProperty0(MutablePropertyReference0 p)
static kotlin.reflect.KMutableProperty1
mutableProperty1(MutablePropertyReference1 p)
static kotlin.reflect.KMutableProperty2
mutableProperty2(MutablePropertyReference2 p)
static kotlin.reflect.KType
nothingType(kotlin.reflect.KType type)
static kotlin.reflect.KType
nullableTypeOf(java.lang.Class klass)
static kotlin.reflect.KType
nullableTypeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection arg1)
static kotlin.reflect.KType
nullableTypeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection... arguments)
static kotlin.reflect.KType
nullableTypeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection arg1, kotlin.reflect.KTypeProjection arg2)
static kotlin.reflect.KType
nullableTypeOf(kotlin.reflect.KClassifier classifier)
static kotlin.reflect.KType
platformType(kotlin.reflect.KType lowerBound, kotlin.reflect.KType upperBound)
static kotlin.reflect.KProperty0
property0(PropertyReference0 p)
static kotlin.reflect.KProperty1
property1(PropertyReference1 p)
static kotlin.reflect.KProperty2
property2(PropertyReference2 p)
static java.lang.String
renderLambdaToString(kotlin.jvm.internal.FunctionBase lambda)
static java.lang.String
renderLambdaToString(kotlin.jvm.internal.Lambda lambda)
static void
setUpperBounds(kotlin.reflect.KTypeParameter typeParameter, kotlin.reflect.KType bound)
static void
setUpperBounds(kotlin.reflect.KTypeParameter typeParameter, kotlin.reflect.KType... bounds)
static kotlin.reflect.KType
typeOf(java.lang.Class klass)
static kotlin.reflect.KType
typeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection arg1)
static kotlin.reflect.KType
typeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection... arguments)
static kotlin.reflect.KType
typeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection arg1, kotlin.reflect.KTypeProjection arg2)
static kotlin.reflect.KType
typeOf(kotlin.reflect.KClassifier classifier)
static kotlin.reflect.KTypeParameter
typeParameter(java.lang.Object container, java.lang.String name, kotlin.reflect.KVariance variance, boolean isReified)
-
-
-
Method Detail
-
createKotlinClass
public static kotlin.reflect.KClass createKotlinClass(java.lang.Class javaClass)
-
createKotlinClass
public static kotlin.reflect.KClass createKotlinClass(java.lang.Class javaClass, java.lang.String internalName)
-
getOrCreateKotlinPackage
@SinceKotlin(version="1.4") public static kotlin.reflect.KDeclarationContainer getOrCreateKotlinPackage(java.lang.Class javaClass)
-
getOrCreateKotlinPackage
public static kotlin.reflect.KDeclarationContainer getOrCreateKotlinPackage(java.lang.Class javaClass, java.lang.String moduleName)
-
getOrCreateKotlinClass
public static kotlin.reflect.KClass getOrCreateKotlinClass(java.lang.Class javaClass)
-
getOrCreateKotlinClass
public static kotlin.reflect.KClass getOrCreateKotlinClass(java.lang.Class javaClass, java.lang.String internalName)
-
getOrCreateKotlinClasses
public static kotlin.reflect.KClass[] getOrCreateKotlinClasses(java.lang.Class[] javaClasses)
-
renderLambdaToString
@SinceKotlin(version="1.1") public static java.lang.String renderLambdaToString(kotlin.jvm.internal.Lambda lambda)
-
renderLambdaToString
@SinceKotlin(version="1.3") public static java.lang.String renderLambdaToString(kotlin.jvm.internal.FunctionBase lambda)
-
function
public static kotlin.reflect.KFunction function(FunctionReference f)
-
property0
public static kotlin.reflect.KProperty0 property0(PropertyReference0 p)
-
mutableProperty0
public static kotlin.reflect.KMutableProperty0 mutableProperty0(MutablePropertyReference0 p)
-
property1
public static kotlin.reflect.KProperty1 property1(PropertyReference1 p)
-
mutableProperty1
public static kotlin.reflect.KMutableProperty1 mutableProperty1(MutablePropertyReference1 p)
-
property2
public static kotlin.reflect.KProperty2 property2(PropertyReference2 p)
-
mutableProperty2
public static kotlin.reflect.KMutableProperty2 mutableProperty2(MutablePropertyReference2 p)
-
typeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType typeOf(kotlin.reflect.KClassifier classifier)
-
typeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType typeOf(java.lang.Class klass)
-
typeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType typeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection arg1)
-
typeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType typeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection arg1, kotlin.reflect.KTypeProjection arg2)
-
typeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType typeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection... arguments)
-
nullableTypeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType nullableTypeOf(kotlin.reflect.KClassifier classifier)
-
nullableTypeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType nullableTypeOf(java.lang.Class klass)
-
nullableTypeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType nullableTypeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection arg1)
-
nullableTypeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType nullableTypeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection arg1, kotlin.reflect.KTypeProjection arg2)
-
nullableTypeOf
@SinceKotlin(version="1.4") public static kotlin.reflect.KType nullableTypeOf(java.lang.Class klass, kotlin.reflect.KTypeProjection... arguments)
-
typeParameter
@SinceKotlin(version="1.4") public static kotlin.reflect.KTypeParameter typeParameter(java.lang.Object container, java.lang.String name, kotlin.reflect.KVariance variance, boolean isReified)
-
setUpperBounds
@SinceKotlin(version="1.4") public static void setUpperBounds(kotlin.reflect.KTypeParameter typeParameter, kotlin.reflect.KType bound)
-
setUpperBounds
@SinceKotlin(version="1.4") public static void setUpperBounds(kotlin.reflect.KTypeParameter typeParameter, kotlin.reflect.KType... bounds)
-
platformType
@SinceKotlin(version="1.6") public static kotlin.reflect.KType platformType(kotlin.reflect.KType lowerBound, kotlin.reflect.KType upperBound)
-
mutableCollectionType
@SinceKotlin(version="1.6") public static kotlin.reflect.KType mutableCollectionType(kotlin.reflect.KType type)
-
nothingType
@SinceKotlin(version="1.6") public static kotlin.reflect.KType nothingType(kotlin.reflect.KType type)
-
-