KtorGenAnnotationPropagation

annotation class KtorGenAnnotationPropagation(val propagateAnnotations: Boolean = true, val annotations: Array<KClass<out Annotation>> = [], val optInAnnotations: Array<KClass<out Annotation>> = [], val factoryFunctionAnnotations: Array<KClass<out Annotation>> = [])(source)

This annotation provides fine-grained control over how annotations from the original interface method are handled and propagated to the generated implementation.

It is useful when you want to selectively propagate certain annotations from the original method, such as @JvmSynthetic, @Deprecated, or annotations marked with @RequiresOptIn, to the generated method.

Properties

Link copied to clipboard

Additional annotations or only these annotations to propagate as-is from the interface method to the generated implementation.

Link copied to clipboard

Additional annotations or only these annotations to propagate as-is to the generated extension functions:

Link copied to clipboard

Opt-in annotations, which should be propagated to generated method, need be marked with @RequiresOptIn or @SubclassOptInRequired, otherwise the generated code will not compile because requirements of @OptIn.

Link copied to clipboard

Indicate if annotations from the source method should be copied to the generated method.