Package-level declarations

Types

Link copied to clipboard
class HandlerAnalyzer(messageCollector: MessageCollector, store: MetadataStore)
Link copied to clipboard
class OpenApiIrGenerationExtension(configuration: CompilerConfiguration, store: MetadataStore) : IrGenerationExtension

Analyzes every concrete AbstractRestHandler subclass of the module (via HandlerAnalyzer) and generates its openApiSpec() override (via OpenApiSpecSynthesizer), returning the handler's OpenAPI fragment as a string constant.

Link copied to clipboard

Synthesizes the openApiSpec() override of a handler class: replaces the frontend's fake override with a real function returning the analyzed OpenAPI fragment as a string constant.

Properties

Link copied to clipboard
val IrType.simpleArguments: List<IrTypeArgument>

Functions

Link copied to clipboard
fun IrClass.allSuperClasses(): List<IrClass>

All superclasses/superinterfaces of this class (excluding itself), breadth-first, deduplicated. Works across module boundaries (lazy IR classes expose their supertypes).

Link copied to clipboard
fun IrAnnotationContainer.annotationArgument(fq: FqName, index: Int = 0): IrExpression?

The index-th argument of this declaration's fq annotation, or null — the annotation is absent, or the parameter is defaulted (a defaulted parameter yields a null argument slot).

Link copied to clipboard
fun IrCall.calleeName(): String
Link copied to clipboard
fun IrCall.calleeParentClassFq(): FqName?

The class declaring the callee of this call (fake overrides resolved), or null for top-level callees.

Link copied to clipboard
fun IrType.classFq(): FqName?
Link copied to clipboard
fun IrExpression.constString(): String?

Statically evaluates this expression as a String, supporting constants, string templates of constants and String.plus chains. Returns null for anything dynamic.

Link copied to clipboard
fun IrCall.dispatchReceiverExpression(): IrExpression?
Link copied to clipboard
fun IrSimpleFunction.extensionReceiverParam(): IrValueParameter?
Link copied to clipboard
fun List<IrClass>.findDeclaredFunction(predicate: (IrSimpleFunction) -> Boolean): IrSimpleFunction?

The first non-fake-override function matching predicate, searching this class chain in order. Only functions with a body in the current module can be analyzed, so callers typically require one.

Link copied to clipboard
fun IrClass.findSuperClass(fq: FqName): IrClass?

The fq ancestor of this class (see allSuperClasses), or null.

Link copied to clipboard
fun IrClass.hasSuperClass(fq: FqName): Boolean

Whether fq is among this class's ancestors (see allSuperClasses).

Link copied to clipboard
fun IrType.isNullableType(): Boolean
Link copied to clipboard
fun IrCall.plusOperands(): Pair<IrExpression, IrExpression>?

The (receiver, argument) operands of a binary plus call, or null for any other call. The two-parameter guard intentionally rejects plus overloads with extra parameters.

Link copied to clipboard
fun IrCall.regularArgument(name: String): IrExpression?

The argument passed for the regular value parameter named name, or null when defaulted.

Link copied to clipboard
fun MessageCollector.reportWarning(file: IrFile?, offset: Int, message: String)

Reports a warning anchored at the given source offset.

Link copied to clipboard
fun IrCall.resolvedCallee(): IrSimpleFunction

The callee resolved through fake overrides to its original declaration. Calls to inherited members reference the fake-override symbol of the dispatch receiver's class, not the declaring class — resolving is required to match callees by their declaring class.

Link copied to clipboard
fun IrType.typeArgumentOrNull(index: Int): IrType?

The index-th type argument as a type, or null (missing argument or star projection).

Link copied to clipboard
fun IrTypeArgument.typeOrNull(): IrType?
Link copied to clipboard
tailrec fun IrExpression.unwrapCasts(): IrExpression

Unwraps implicit casts/coercions inserted by the frontend.