[SLC] replace SymbolAnnotationParameterList with SymbolLazyAnnotationParameterList
^KT-56046
This commit is contained in:
committed by
Space Team
parent
73707941bb
commit
871bfab6da
-31
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2023 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.light.classes.symbol.annotations
|
|
||||||
|
|
||||||
import com.intellij.psi.PsiAnnotationParameterList
|
|
||||||
import com.intellij.psi.PsiNameValuePair
|
|
||||||
import org.jetbrains.kotlin.analysis.api.annotations.KtNamedAnnotationValue
|
|
||||||
import org.jetbrains.kotlin.asJava.classes.lazyPub
|
|
||||||
import org.jetbrains.kotlin.asJava.elements.KtLightElementBase
|
|
||||||
import org.jetbrains.kotlin.psi.KtElement
|
|
||||||
|
|
||||||
internal class SymbolAnnotationParameterList(
|
|
||||||
parent: SymbolLightAbstractAnnotation,
|
|
||||||
private val arguments: List<KtNamedAnnotationValue>,
|
|
||||||
) : KtLightElementBase(parent), PsiAnnotationParameterList {
|
|
||||||
|
|
||||||
private val _attributes: Array<PsiNameValuePair> by lazyPub {
|
|
||||||
arguments.map {
|
|
||||||
SymbolNameValuePairForAnnotationArgument(it, this)
|
|
||||||
}.toTypedArray()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getAttributes(): Array<PsiNameValuePair> = _attributes
|
|
||||||
|
|
||||||
override val kotlinOrigin: KtElement? get() = null
|
|
||||||
|
|
||||||
//TODO: EQ GHC EQIV
|
|
||||||
}
|
|
||||||
+1
-1
@@ -13,7 +13,7 @@ import org.jetbrains.kotlin.asJava.elements.KtLightElementBase
|
|||||||
import org.jetbrains.kotlin.psi.KtElement
|
import org.jetbrains.kotlin.psi.KtElement
|
||||||
|
|
||||||
internal class SymbolLazyAnnotationParameterList(
|
internal class SymbolLazyAnnotationParameterList(
|
||||||
parent: SymbolLightLazyAnnotation,
|
parent: SymbolLightAbstractAnnotation,
|
||||||
private val lazyArguments: Lazy<List<KtNamedAnnotationValue>>,
|
private val lazyArguments: Lazy<List<KtNamedAnnotationValue>>,
|
||||||
) : KtLightElementBase(parent),
|
) : KtLightElementBase(parent),
|
||||||
PsiAnnotationParameterList {
|
PsiAnnotationParameterList {
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ internal class SymbolLightAnnotationForAnnotationCall(
|
|||||||
PsiImplUtil.findDeclaredAttributeValue(this, attributeName)
|
PsiImplUtil.findDeclaredAttributeValue(this, attributeName)
|
||||||
|
|
||||||
private val _parameterList: PsiAnnotationParameterList by lazyPub {
|
private val _parameterList: PsiAnnotationParameterList by lazyPub {
|
||||||
SymbolAnnotationParameterList(this, annotationCall.arguments)
|
SymbolLazyAnnotationParameterList(this, lazyOf(annotationCall.arguments))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getParameterList(): PsiAnnotationParameterList = _parameterList
|
override fun getParameterList(): PsiAnnotationParameterList = _parameterList
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ internal class SymbolLightSimpleAnnotation(
|
|||||||
PsiImplUtil.findDeclaredAttributeValue(this, attributeName)
|
PsiImplUtil.findDeclaredAttributeValue(this, attributeName)
|
||||||
|
|
||||||
private val _parameterList: PsiAnnotationParameterList by lazyPub {
|
private val _parameterList: PsiAnnotationParameterList by lazyPub {
|
||||||
SymbolAnnotationParameterList(this, arguments)
|
SymbolLazyAnnotationParameterList(this, lazyOf(arguments))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getParameterList(): PsiAnnotationParameterList = _parameterList
|
override fun getParameterList(): PsiAnnotationParameterList = _parameterList
|
||||||
|
|||||||
Reference in New Issue
Block a user