All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.fir.declarations.impl.FirPropertyAccessorImpl.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
/*
 * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
 * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
 */

package org.jetbrains.kotlin.fir.declarations.impl

import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.fir.FirImplementationDetail
import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.FirSourceElement
import org.jetbrains.kotlin.fir.contracts.FirContractDescription
import org.jetbrains.kotlin.fir.declarations.FirDeclarationAttributes
import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin
import org.jetbrains.kotlin.fir.declarations.FirDeclarationStatus
import org.jetbrains.kotlin.fir.declarations.FirPropertyAccessor
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
import org.jetbrains.kotlin.fir.declarations.FirValueParameter
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
import org.jetbrains.kotlin.fir.expressions.FirBlock
import org.jetbrains.kotlin.fir.references.FirControlFlowGraphReference
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertyAccessorSymbol
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.*

/*
 * This file was generated automatically
 * DO NOT MODIFY IT MANUALLY
 */

open class FirPropertyAccessorImpl @FirImplementationDetail constructor(
    override val source: FirSourceElement?,
    override val session: FirSession,
    override var resolvePhase: FirResolvePhase,
    override val origin: FirDeclarationOrigin,
    override var returnTypeRef: FirTypeRef,
    override val valueParameters: MutableList,
    override var body: FirBlock?,
    override var contractDescription: FirContractDescription,
    override val symbol: FirPropertyAccessorSymbol,
    override val isGetter: Boolean,
    override var status: FirDeclarationStatus,
    override val annotations: MutableList,
    override val typeParameters: MutableList,
) : FirPropertyAccessor() {
    override val attributes: FirDeclarationAttributes = FirDeclarationAttributes()
    override val receiverTypeRef: FirTypeRef? get() = null
    override var controlFlowGraphReference: FirControlFlowGraphReference? = null
    override val isSetter: Boolean get() = !isGetter

    init {
        symbol.bind(this)
    }

    override fun  acceptChildren(visitor: FirVisitor, data: D) {
        returnTypeRef.accept(visitor, data)
        controlFlowGraphReference?.accept(visitor, data)
        valueParameters.forEach { it.accept(visitor, data) }
        body?.accept(visitor, data)
        contractDescription.accept(visitor, data)
        status.accept(visitor, data)
        annotations.forEach { it.accept(visitor, data) }
        typeParameters.forEach { it.accept(visitor, data) }
    }

    override fun  transformChildren(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        transformReturnTypeRef(transformer, data)
        controlFlowGraphReference = controlFlowGraphReference?.transformSingle(transformer, data)
        transformValueParameters(transformer, data)
        transformBody(transformer, data)
        transformContractDescription(transformer, data)
        transformStatus(transformer, data)
        transformAnnotations(transformer, data)
        transformTypeParameters(transformer, data)
        return this
    }

    override fun  transformReturnTypeRef(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        returnTypeRef = returnTypeRef.transformSingle(transformer, data)
        return this
    }

    override fun  transformReceiverTypeRef(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        return this
    }

    override fun  transformValueParameters(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        valueParameters.transformInplace(transformer, data)
        return this
    }

    override fun  transformBody(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        body = body?.transformSingle(transformer, data)
        return this
    }

    override fun  transformContractDescription(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        contractDescription = contractDescription.transformSingle(transformer, data)
        return this
    }

    override fun  transformStatus(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        status = status.transformSingle(transformer, data)
        return this
    }

    override fun  transformAnnotations(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        annotations.transformInplace(transformer, data)
        return this
    }

    override fun  transformTypeParameters(transformer: FirTransformer, data: D): FirPropertyAccessorImpl {
        typeParameters.transformInplace(transformer, data)
        return this
    }

    override fun replaceResolvePhase(newResolvePhase: FirResolvePhase) {
        resolvePhase = newResolvePhase
    }

    override fun replaceReturnTypeRef(newReturnTypeRef: FirTypeRef) {
        returnTypeRef = newReturnTypeRef
    }

    override fun replaceReceiverTypeRef(newReceiverTypeRef: FirTypeRef?) {}

    override fun replaceControlFlowGraphReference(newControlFlowGraphReference: FirControlFlowGraphReference?) {
        controlFlowGraphReference = newControlFlowGraphReference
    }

    override fun replaceValueParameters(newValueParameters: List) {
        valueParameters.clear()
        valueParameters.addAll(newValueParameters)
    }

    override fun replaceContractDescription(newContractDescription: FirContractDescription) {
        contractDescription = newContractDescription
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy