Mutable Map Builders
open class MutableMapBuilders(collections: CollectionsBuilders, builder: IrBuilderWithScope, context: IrPluginContext) : MapBuilders
Content copied to clipboard
Functions
as Const
Link copied to clipboard
open fun Boolean.asConst(type: IrType = context.irBuiltIns.booleanType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Boolean>
Content copied to clipboard
open fun Byte.asConst(type: IrType = context.irBuiltIns.byteType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Byte>
Content copied to clipboard
open fun Char.asConst(type: IrType = context.irBuiltIns.charType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Char>
Content copied to clipboard
open fun Double.asConst(type: IrType = context.irBuiltIns.doubleType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Double>
Content copied to clipboard
open fun Float.asConst(type: IrType = context.irBuiltIns.floatType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Float>
Content copied to clipboard
open fun Int.asConst(type: IrType = context.irBuiltIns.intType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Int>
Content copied to clipboard
open fun Long.asConst(type: IrType = context.irBuiltIns.longType, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrConst<Long>
Content copied to clipboard
build Lambda
Link copied to clipboard
open fun IrBuilderWithScope.buildLambda(returnType: IrType?, funBuilder: IrFunctionBuilder.() -> Unit = {}, funApply: IrSimpleFunction.() -> Unit): IrSimpleFunction
Content copied to clipboard
Builds a local function to be used as a lambda, likely with lambdaArgument Return type must be specified at some point, but may be passed as null and specified later. Will be automatically set if the lambda has an expression body and it wasn't set in funBuilder or funApply
build Statement
Link copied to clipboard
contains Key
Link copied to clipboard
fun containsKey(receiver: IrExpression, key: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrCall
Content copied to clipboard
contains Value
Link copied to clipboard
fun containsValue(receiver: IrExpression, value: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrCall
Content copied to clipboard
create Ir Builder
Link copied to clipboard
open fun createIrBuilder(symbol: IrSymbol, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): DeclarationIrBuilder
Content copied to clipboard
create Ir Builder At
Link copied to clipboard
get Or Default
Link copied to clipboard
fun getOrDefault(receiver: IrExpression, key: IrExpression, default: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrCall
Content copied to clipboard
get Or Else
Link copied to clipboard
fun getOrElse(receiver: IrExpression, key: IrExpression, valueType: IrType = receiver.type.raiseToOrNull { it.isClassifierOf(Kotlin.Collections.Map) }
?.safeAs<IrSimpleType>()?.arguments?.get(1)?.typeOrNull
?: error("Can't auto-detect value type, must specify"), startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, otherwise: IrBlockBodyBuilder.() -> Unit): IrCall
Content copied to clipboard
get Or Else Expr
Link copied to clipboard
fun getOrElseExpr(receiver: IrExpression, key: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, otherwise: IrBuilderWithScope.() -> IrExpression): IrCall
Content copied to clipboard
get Or Put
Link copied to clipboard
fun getOrPut(receiver: IrExpression, key: IrExpression, valueType: IrType = receiver.type.raiseToOrNull { it.isClassifierOf(Kotlin.Collections.MutableMap) }
?.safeAs<IrSimpleType>()?.arguments?.get(1)?.typeOrNull
?: error("Can't auto-detect value type, must specify"), startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, otherwise: IrBlockBodyBuilder.() -> Unit): IrCall
Content copied to clipboard
get Or Put Expr
Link copied to clipboard
fun getOrPutExpr(receiver: IrExpression, key: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, otherwise: IrBuilderWithScope.() -> IrExpression): IrCall
Content copied to clipboard
ir Call
Link copied to clipboard
open fun IrBuilderWithScope.irCall(funcRef: FunctionRef, type: IrType): IrCall
Content copied to clipboard
is Subclass Of
Link copied to clipboard
lambda Argument
Link copied to clipboard
open fun lambdaArgument(lambda: IrSimpleFunction, type: IrType = run {
//TODO workaround for https://youtrack.jetbrains.com/issue/KT-46896
val base = if (lambda.isSuspend)
context.referenceClass(
StandardNames.getSuspendFunctionClassId(lambda.allParameters.size).asSingleFqName()
)
?: error("suspend function type not found")
else
context.referenceClass(StandardNames.getFunctionClassId(lambda.allParameters.size).asSingleFqName())
?: error("function type not found")
base.typeWith(lambda.allParameters.map { it.type } + lambda.returnType)
}, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrFunctionExpression
Content copied to clipboard
Creates a IrFunctionExpressionImpl from the given function, auto-inferring the type if not specified
minus Iterable Keys
Link copied to clipboard
fun minusIterableKeys(receiver: IrExpression, keys: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrCall
Content copied to clipboard
plus Element Pair
Link copied to clipboard
fun plusElementPair(receiver: IrExpression, other: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrCall
Content copied to clipboard
plus Element Pair Of
Link copied to clipboard
fun plusElementPairOf(receiver: IrExpression, key: IrExpression, value: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrCall
Content copied to clipboard
plus Iterable Pairs
Link copied to clipboard
fun plusIterablePairs(receiver: IrExpression, other: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrCall
Content copied to clipboard
put All Iterable
Link copied to clipboard
fun putAllIterable(receiver: IrExpression, items: IrExpression, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrCall
Content copied to clipboard
resolve Or Null
Link copied to clipboard
resolve Type With
Link copied to clipboard
open fun ClassRef.resolveTypeWith(vararg arguments: IrType): IrSimpleType
Content copied to clipboard
with Builder
Link copied to clipboard
open fun <T> IrSymbolOwner.withBuilder(block: DeclarationIrBuilder.() -> T): T
Content copied to clipboard
Properties
Sources
jvm source
Link copied to clipboard