org.jetbrains.kotlin.analysis.api.rendering¶
Types¶
KaClassTypeQualification¶
enum class KaClassTypeQualification : Enum<KaClassTypeQualification>
Controls how qualified the name of a class type is rendered.
KaClassTypeRenderingMode¶
enum class KaClassTypeRenderingMode : Enum<KaClassTypeRenderingMode>
Controls how a class type which involves a type alias is rendered: either as the abbreviation (the type alias application, e.g. foo.bar.StringAlias) or as its expansion (e.g. kotlin.String), optionally with the other one in a comment.
KaPiece¶
A typed, enumerated key that identifies a specific piece of a symbol or a type to render.
KaPieceRenderer¶
abstract class KaPieceRenderer<T>(val piece: KaPiece<T>)
Renders a single KaPiece into the contextual KaRenderingOutput.
KaRenderer¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaRenderer
Renders Analysis API entities such as KaSymbols or KaTypes into a KaRenderingOutput as human-readable, Kotlin-like text.
KaRendererBuilder¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaRendererBuilder
A mutable builder for customizing a KaRenderer, available within KaRenderer.copy.
KaRendererBuilderDslMarker¶
@DslMarker
annotation class KaRendererBuilderDslMarker
A DSL marker used to annotate entities related to the renderer customization in KaRendererBuilder.
KaRenderingContext¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaRenderingContext
The rendering state passed to every KaPieceRenderer, used to render nested pieces and to read KaRenderingOption values.
KaRenderingOption¶
class KaRenderingOption<T>
A typed configuration flag that influences rendering. Its defaultValue is used unless overridden via KaRendererBuilder.set.
KaRenderingOutput¶
interface KaRenderingOutput
A destination for rendered output. A KaRenderer writes text fragments, each tagged with KaTextAttributes that describe its semantic role, so an output may add syntax highlighting, produce plain text, or ignore the attributes entirely.
KaTextAttribute¶
interface KaTextAttribute
Describes the semantic role of a fragment of rendered text, e.g. for syntax highlighting.
KaTypeApproximation¶
enum class KaTypeApproximation : Enum<KaTypeApproximation>
Controls whether rendered types are approximated to denotable types (types which can be written in Kotlin source code), and in which direction.
Properties¶
output¶
context(output: KaRenderingOutput)
val output: KaRenderingOutput
A convenience property allowing to get the KaRenderingOutput inside the rendering block without contextOf<KaRenderingOutput>().