NavigationCodegenProcessor

class NavigationCodegenProcessor(codeGenerator: CodeGenerator, logger: KSPLogger, hideFromObjC: Boolean) : SymbolProcessor(source)

KSP processor that turns navigation codegen annotations into Metro graph extensions and navigation bindings. Loaded once per build by KSP through NavigationCodegenProcessorProvider.

The processor walks seven annotation queries in order. Three target presenter classes in shared Kotlin Multiplatform modules: @NavDestination, @AppRoot, and @ChildPresenter. Four target composable functions in Android UI modules: @ScreenUi, @SheetUi, @TabUi, and @AppRootUi. Each match goes through a parser to produce a typed intermediate representation, then through a generator to produce one or more FileSpec outputs that KSP writes to disk. Full pipeline and rationale behind each step live in the pipeline notes.

The processor never throws on bad input. Every validation failure is reported through KSPLogger.error pinned to the offending symbol, and KSP turns that into a compile error at the source position.

Constructors

Link copied to clipboard
constructor(codeGenerator: CodeGenerator, logger: KSPLogger, hideFromObjC: Boolean)

Functions

Link copied to clipboard
open fun finish()
Link copied to clipboard
open fun onError()
Link copied to clipboard
open override fun process(resolver: Resolver): List<KSAnnotated>

Runs one KSP round. Iterates the seven annotations the processor knows about, hands each symbol to the matching parser and generator, and returns an empty list of deferred symbols because this processor produces nothing on subsequent rounds.