compiler-plugin / arrow.meta.quotes.modifierlistowner / TypeReference
class TypeReference :
Scope
<KtTypeReference>
A template destructuring Scope for a TypeReference.
import arrow.meta.Meta
import arrow.meta.CliPlugin
import arrow.meta.invoke
import arrow.meta.quotes.Transform
import arrow.meta.quotes.typeReference
val Meta.changeTypeReference: CliPlugin
get() =
"ReformatModifier" {
meta(
typeReference(this, { true }) { modifierListOwner ->
Transform.replace(
replacing = modifierListOwner,
newDeclaration = """$`@annotations` $typeElement""".type
)
}
)
}
<init> | A template destructuring Scope for a TypeReference.TypeReference(value: KtTypeReference?, typeElement: Scope <KtTypeElement>? = Scope(value?.typeElement), @annotations: ScopedList <KtAnnotationEntry> = ScopedList(separator = " ", value = value?.annotationEntries.orEmpty())) |
@annotations | val @annotations: ScopedList <KtAnnotationEntry> |
typeElement | val typeElement: Scope <KtTypeElement>? |
value | val value: KtTypeReference? |
identity | fun ElementScope .identity(): TypeReference |
map | fun <K : KtElement> Scope <K>.map(f: (K) -> K): Scope <K> |
orEmpty | fun <K : KtElement> Scope <K>?.orEmpty(): Scope <K> |
Do you like Arrow?
✖