io.github.karlatemp.mxlib.injector.injects.kt Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2018-2021 Karlatemp. All rights reserved.
* @author Karlatemp
*
* MXLib/MXLib.mxlib-api-kotlin.main/injects.kt
*
* Use of this source code is governed by the MIT license that can be found via the following link.
*
* https://github.com/Karlatemp/MxLib/blob/master/LICENSE
*/
@file:JvmName("InjectKt")
@file:Suppress("NOTHING_TO_INLINE")
package io.github.karlatemp.mxlib.injector
import kotlin.reflect.KProperty
public inline operator fun Injected.Nillable.getValue(thiz: Any?, p: KProperty<*>): T? = getValue()
public inline operator fun Injected.Nonnull.getValue(thiz: Any?, p: KProperty<*>): T = getValue()