compiler-plugin / arrow.meta.quotes.modifierlistowner / ModifierList

ModifierList

class ModifierList : Scope<KtModifierList>

””” $@annotations $modifier value “””.modifierList

A template destructuring Scope for a KtModifierList.

import arrow.meta.Meta
import arrow.meta.CliPlugin
import arrow.meta.invoke
import arrow.meta.quotes.Transform
import arrow.meta.quotes.modifierList

val Meta.reformatModifierList: CliPlugin
   get() =
     "Reformat ModifierList" {
       meta(
         modifierList({ true }){ modifierList ->
           Transform.replace(
             replacing = modifierList,
             newDeclaration = """ $`@annotations` $modifier value """.`modifierList`
           )
         }
       )
     }

Constructors

<init> ””” $@annotations $modifier value “””.modifierListModifierList(value: KtModifierList?, @annotations: ScopedList<KtAnnotationEntry> = ScopedList(value?.annotationEntries.orEmpty()), modifier: PsiElement? = value?.visibilityModifier())

Properties

@annotations val @annotations: ScopedList<KtAnnotationEntry>
modifier val modifier: PsiElement?
value val value: KtModifierList?

Extension Functions

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?

Arrow Org
<