compiler-plugin / arrow.meta.quotes.classorobject / ClassOrObjectScope

ClassOrObjectScope

open class ClassOrObjectScope<out T : KtClassOrObject> : Scope<T>

A template destructuring Scope for a KtClassOrObject

Parent scope of KtClass and KtObjectDeclaration

Constructors

<init> A template destructuring Scope for a KtClassOrObjectClassOrObjectScope(value: T, @annotations: ScopedList<KtAnnotationEntry> = ScopedList(value.annotationEntries), modality: Name? = value.modalityModifierType()?.value?.let(Name::identifier), superTypes: ScopedList<KtSuperTypeListEntry> = ScopedList(value = value.superTypeListEntries, prefix = if (value.superTypeListEntries.isEmpty()) "" else " : "), body: ClassBody = ClassBody(value.body), declarations: ScopedList<KtDeclaration> = ScopedList(value = value.declarations, separator = "\n"), primaryConstructor: KtPrimaryConstructor? = value.primaryConstructor, primaryConstructorParameterList: ScopedList<KtParameter> = ScopedList(value = value.primaryConstructorParameters, separator = ", "), secondaryConstructor: ScopedList<KtSecondaryConstructor> = ScopedList(value = value.secondaryConstructors), anonymousInitializers: ScopedList<KtAnonymousInitializer> = ScopedList(value = value.getAnonymousInitializers()), name: Name? = value.nameAsName)

Properties

@annotations val @annotations: ScopedList<KtAnnotationEntry>
anonymousInitializers val anonymousInitializers: ScopedList<KtAnonymousInitializer>
body val body: ClassBody
declarations val declarations: ScopedList<KtDeclaration>
modality val modality: Name?
name val name: Name?
primaryConstructor val primaryConstructor: KtPrimaryConstructor?
primaryConstructorParameterList val primaryConstructorParameterList: ScopedList<KtParameter>
secondaryConstructor val secondaryConstructor: ScopedList<KtSecondaryConstructor>
superTypes val superTypes: ScopedList<KtSuperTypeListEntry>
value open val value: T

Extension Properties

allConstructors val <T : KtClassOrObject> ClassOrObjectScope<T>.allConstructors: ScopedList<KtConstructor<*>>

Extension Functions

getOrCreateBody fun <T : KtClassOrObject> ClassOrObjectScope<T>.getOrCreateBody(): Scope<KtClassBody>
map fun <K : KtElement> Scope<K>.map(f: (K) -> K): Scope<K>
orEmpty fun <K : KtElement> Scope<K>?.orEmpty(): Scope<K>

Inheritors

ClassDeclaration """|$`@annotations` $kind $name $`(typeParameters)` $`(params)` : $supertypes"} { $body } """.`class``class ClassDeclaration : [ClassOrObjectScope](./index.html)`
ObjectDeclaration ””” object $name { $body }””“.objectDeclarationclass ObjectDeclaration : ClassOrObjectScope<KtObjectDeclaration>

Do you like Arrow?

Arrow Org
<