Package-level declarations

Types

Link copied to clipboard

Exhaustive list of all possible IrClass kinds to allow pretty printing

Link copied to clipboard
typealias IrTreeNode = TreeNode<IrElement>

Properties

Link copied to clipboard
val IrFunctionAccessExpression.annotations: List<IrConstructorCall>
Link copied to clipboard
val IrFunctionAccessExpression.callableId: CallableId
Link copied to clipboard
val IrElement.contextReceivers: List<IrValueParameter>
val IrFunction.contextReceivers: List<IrValueParameter>
Link copied to clipboard
Link copied to clipboard
val IrTreeNode.irFile: IrFile?
Link copied to clipboard
val IrFunction.irReturn: IrReturn?
val IrFunctionExpression.irReturn: IrReturn?
Link copied to clipboard
val IrElement.irType: IrType
val IrTypeArgument.irType: IrType
Link copied to clipboard
Link copied to clipboard
val IrFunctionAccessExpression.name: Name
Link copied to clipboard
val IrFunctionAccessExpression.packageFqName: FqName
Link copied to clipboard
Link copied to clipboard
val IrTreeNode.parentIrDeclaration: IrDeclaration?
Link copied to clipboard
val IrTreeNode.parentIrDeclarationWithName: IrDeclarationWithName?
Link copied to clipboard
val IrTreeNode.parentIrFunction: IrFunction?
Link copied to clipboard
val IrElement.treeNode: IrTreeNode
Link copied to clipboard
val IrTypeArgument.type: IrType
Link copied to clipboard
val IrElement.typeParameters: List<IrTypeParameter>
Link copied to clipboard
val IrElement.typeParameterSymbols: List<IrTypeParameterSymbol>

Functions

Link copied to clipboard
inline fun <O : IrElement> IrElement.asIr(): O
inline fun <O : IrType> IrType.asIr(): O
Link copied to clipboard
inline fun <O : IrElement> IrElement?.asIrOrNull(): O?
inline fun <O : IrType> IrType?.asIrOrNull(): O?
Link copied to clipboard
inline fun IrFunction.copyIrReturn(value: IrExpression): IrReturn
Link copied to clipboard
inline fun IrPluginContext.createDefaultPropertyAccessor(name: String, builder: IrFunctionBuilder.() -> Unit = {}, function: IrSimpleFunction.() -> Unit = {}): IrSimpleFunction
Link copied to clipboard
inline fun IrPluginContext.createExpressionBody(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, expression: IrExpression): IrExpressionBody
Link copied to clipboard
inline fun IrPluginContext.createGetterIrSimpleFunction(name: Name, builder: IrFunctionBuilder.() -> Unit = {}, function: IrSimpleFunction.() -> Unit = {}): IrSimpleFunction
Link copied to clipboard
inline fun IrPluginContext.createIrBlockBody(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET): IrBlockBody
inline fun IrPluginContext.createIrBlockBody(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, initializer: IrBlockBody.() -> Unit): IrBlockBody
inline fun IrPluginContext.createIrBlockBody(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, statements: List<IrStatement>): IrBlockBody
Link copied to clipboard
inline fun IrPluginContext.createIrField(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED, name: Name, visibility: DescriptorVisibility = DescriptorVisibilities.LOCAL, symbol: IrFieldSymbol = IrFieldSymbolImpl(), type: IrType, isFinal: Boolean = true, isStatic: Boolean = false, isExternal: Boolean = false, block: IrField.() -> Unit = {}): IrField
Link copied to clipboard
inline fun createIrFunctionExpression(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, type: IrType, function: IrSimpleFunction, origin: IrStatementOrigin): IrFunctionExpression
Link copied to clipboard
inline fun createIrGetValue(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, type: IrType, symbol: IrValueSymbol, origin: IrStatementOrigin? = null, block: IrGetValueImpl.() -> Unit = {}): IrGetValue
Link copied to clipboard
inline fun createIrReturn(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, type: IrType, returnTargetSymbol: IrReturnTargetSymbol, value: IrExpression, block: IrReturnImpl.() -> Unit = {}): IrReturn
Link copied to clipboard
inline fun createIrVariable(name: Name, type: IrType, parent: IrDeclarationParent? = null, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED, isVar: Boolean = false, isConst: Boolean = false, isLateinit: Boolean = false, block: IrVariableImpl.() -> Unit = {}): IrVariable
Link copied to clipboard
inline fun IrType.createIrVariable(name: Name, parent: IrDeclarationParent? = null, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED, isVar: Boolean = false, isConst: Boolean = false, isLateinit: Boolean = false, block: IrVariableImpl.() -> Unit = {}): IrVariable
Link copied to clipboard
inline fun IrPluginContext.createLambdaIrSimpleFunction(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, origin: IrDeclarationOrigin = IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA, name: Name = SpecialNames.ANONYMOUS, visibility: DescriptorVisibility = DescriptorVisibilities.LOCAL, isInline: Boolean = false, isExpect: Boolean = false, returnType: IrType = irBuiltIns.nothingType, modality: Modality = Modality.FINAL, symbol: IrSimpleFunctionSymbol = IrSimpleFunctionSymbolImpl(), isTailrec: Boolean = false, isSuspend: Boolean = false, isOperator: Boolean = false, isInfix: Boolean = false, isExternal: Boolean = false, containerSource: DeserializedContainerSource? = null, isFakeOverride: Boolean = origin == IrDeclarationOrigin.FAKE_OVERRIDE, block: IrSimpleFunction.() -> Unit = {}): IrSimpleFunction
Link copied to clipboard
inline fun IrPluginContext.declarationIrBuilder(element: IrSymbolOwner): DeclarationIrBuilder
inline fun IrPluginContext.declarationIrBuilder(symbol: IrSymbol): DeclarationIrBuilder
Link copied to clipboard
inline fun IrTreeNode.dump(): String
inline fun Iterable<IrElement>.dump(): String
Link copied to clipboard
inline fun Iterable<IrElement>.dumpKotlinLike(): String
inline fun Iterable<IrType?>.dumpKotlinLike(): String
inline fun Iterable<IrTypeArgument?>.dumpKotlinLike(): String
Link copied to clipboard
inline fun <T : Enum<T>> IrClass.enumEntry(enum: T): IrEnumEntry?
Link copied to clipboard
inline fun <T : IrElement> IrTreeNode.filterIrIsInstance(): List<T>
inline fun <T : IrElement> Iterable<IrTreeNode>.filterIrIsInstance(): List<T>
inline fun <T : IrElement> Sequence<IrTreeNode>.filterIrIsInstance(): Sequence<T>
Link copied to clipboard
inline fun IrPluginContext.firstIrClass(classId: ClassId): IrClass
Link copied to clipboard
inline fun IrPluginContext.firstIrClassOrNull(classId: ClassId): IrClass?
Link copied to clipboard
inline fun IrPluginContext.firstIrClassSymbol(classId: ClassId): IrClassSymbol
Link copied to clipboard
inline fun IrPluginContext.firstIrClassSymbolOrNull(classId: ClassId): IrClassSymbol?
Link copied to clipboard
inline fun IrPluginContext.firstIrFunction(callableId: CallableId): IrFunction
Link copied to clipboard
inline fun IrPluginContext.firstIrFunctionOrNull(callableId: CallableId): IrFunction?
Link copied to clipboard
inline fun IrPluginContext.firstIrFunctionSymbol(callableId: CallableId): IrFunctionSymbol
Link copied to clipboard
inline fun IrPluginContext.firstIrFunctionSymbolOrNull(callableId: CallableId): IrFunctionSymbol?
Link copied to clipboard
inline fun <T : IrElement> IrTreeNode.firstIrOrNull(): T?
inline fun <T : IrElement> Iterable<IrTreeNode>.firstIrOrNull(): T?
inline fun <T : IrElement> Sequence<IrTreeNode>.firstIrOrNull(): T?
inline fun <T : IrElement> IrTreeNode.firstIrOrNull(predicate: (T) -> Boolean): T?
inline fun <T : IrElement> Iterable<IrTreeNode>.firstIrOrNull(predicate: (T) -> Boolean): T?
inline fun <T : IrElement> Sequence<IrTreeNode>.firstIrOrNull(predicate: (T) -> Boolean): T?
Link copied to clipboard
inline fun IrPluginContext.firstIrSimpleFunction(callableId: CallableId): IrSimpleFunction
Link copied to clipboard
inline fun IrPluginContext.firstIrSimpleFunctionOrNull(callableId: CallableId): IrSimpleFunction?
Link copied to clipboard
inline fun IrPluginContext.firstIrSimpleFunctionSymbol(callableId: CallableId): IrSimpleFunctionSymbol
Link copied to clipboard
inline fun IrPluginContext.firstIrSimpleFunctionSymbolOrNull(callableId: CallableId): IrSimpleFunctionSymbol?
Link copied to clipboard
inline fun <T : Annotation> IrElement.hasAnnotation(): Boolean
inline fun <T : Annotation> IrAnnotationContainer.hasAnnotation(): Boolean
inline fun <T : Annotation> IrFunctionAccessExpression.hasAnnotation(): Boolean
inline fun IrElement.hasAnnotation(annotation: FqName): Boolean
inline fun IrFunctionAccessExpression.hasAnnotation(annotation: FqName): Boolean
Link copied to clipboard
inline fun <T> IrPluginContext.irType(): IrType
Link copied to clipboard
inline fun IrTreeNode.render(): String
Link copied to clipboard
inline fun IrType.substituteOrSelf(substitutionMap: Map<IrTypeParameterSymbol, IrType>?): IrType
inline fun IrType.substituteOrSelf(original: IrTypeParametersContainer, transformed: IrTypeParametersContainer): IrType
Link copied to clipboard
inline fun IrSimpleFunction.toIrCall(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, symbol: IrSimpleFunctionSymbol = this.symbol, type: IrType = returnType, typeArgumentsCount: Int = typeParameters.size, origin: IrStatementOrigin? = null, superQualifierSymbol: IrClassSymbol? = null, block: IrCall.() -> Unit = {}): IrCall
Link copied to clipboard
inline fun IrExpression.toIrConst(irType: IrType = type, startOffset: Int = SYNTHETIC_OFFSET, endOffset: Int = SYNTHETIC_OFFSET): IrConst
Link copied to clipboard
inline fun IrExpression?.toIrConstOrNull(irType: IrType? = this?.type, startOffset: Int = SYNTHETIC_OFFSET, endOffset: Int = SYNTHETIC_OFFSET): IrConst?
Link copied to clipboard
inline fun IrConstructor.toIrConstructorCall(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, symbol: IrConstructorSymbol = this.symbol, type: IrType = symbol.owner.returnType, typeArgumentsCount: Int = symbol.owner.typeParameters.size, origin: IrStatementOrigin? = null, source: SourceElement = SourceElement.NO_SOURCE, block: IrFunctionAccessExpression.() -> Unit = {}): IrConstructorCall
Link copied to clipboard
inline fun IrDeclaration.toIrExpression(): IrExpression
Link copied to clipboard
inline fun IrValueParameter.toIrField(pluginContext: IrPluginContext, startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED, name: Name = this.name, visibility: DescriptorVisibility = DescriptorVisibilities.LOCAL, symbol: IrFieldSymbol = IrFieldSymbolImpl(), type: IrType = this.type, isFinal: Boolean = true, isStatic: Boolean = false, isExternal: Boolean = false, block: IrField.() -> Unit = {}): IrField
Link copied to clipboard
inline fun IrDeclaration.toIrFunctionAccessExpression(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, symbol: IrFunctionSymbol = when (this) { is IrFunction -> this.symbol else -> TODO() }, type: IrType = symbol.owner.returnType, typeArgumentsCount: Int = symbol.owner.typeParameters.size, origin: IrStatementOrigin? = null, superQualifierSymbol: IrClassSymbol? = null, source: SourceElement = SourceElement.NO_SOURCE, block: IrFunctionAccessExpression.() -> Unit = {}): IrFunctionAccessExpression
inline fun IrFunction.toIrFunctionAccessExpression(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, symbol: IrFunctionSymbol = this.symbol, type: IrType = symbol.owner.returnType, typeArgumentsCount: Int = symbol.owner.typeParameters.size, origin: IrStatementOrigin? = null, superQualifierSymbol: IrClassSymbol? = null, source: SourceElement = SourceElement.NO_SOURCE, block: IrFunctionAccessExpression.() -> Unit = {}): IrFunctionAccessExpression
Link copied to clipboard
inline fun IrType.toIrGetEnumValue(enumEntry: IrEnumEntry): IrGetEnumValue
Link copied to clipboard
inline fun IrClass.toIrGetObjectValue(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, symbol: IrClassSymbol = this.symbol, type: IrType = symbol.owner.defaultType): IrGetObjectValue
Link copied to clipboard
inline fun IrValueParameter.toIrGetValue(): IrGetValue
inline fun IrVariable.toIrGetValue(): IrGetValue
inline fun IrClass.toIrGetValue(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, symbol: IrValueSymbol = this.thisReceiver?.symbol ?: error("${dumpKotlinLike()} has no `thisReceiver`"), block: IrGetValueImpl.() -> Unit = {}): IrGetValue
inline fun IrFunction.toIrGetValue(startOffset: Int = UNDEFINED_OFFSET, endOffset: Int = UNDEFINED_OFFSET, symbol: IrValueSymbol = this.dispatchReceiverParameter!!.symbol, type: IrType = symbol.owner.type, origin: IrStatementOrigin? = null, block: IrGetValueImpl.() -> Unit = {}): IrGetValue
Link copied to clipboard
fun IrElement.toIrTreeNode(): IrTreeNode
Link copied to clipboard
inline fun IrSimpleType.toIrTypeProjection(variance: Variance = Variance.INVARIANT): IrTypeProjection
inline fun IrType.toIrTypeProjection(variance: Variance = Variance.INVARIANT): IrTypeProjection
Link copied to clipboard
inline fun IrType.toIrTypeProjectionOrNull(variance: Variance = Variance.INVARIANT): IrTypeProjection?