[AA] KtSymbolInfoProvider: pass missing annotationUseSiteTarget to getDeprecation
^KT-56046
This commit is contained in:
committed by
Space Team
parent
93232a23df
commit
cfdc9f342a
+20
-22
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -7,12 +7,12 @@ package org.jetbrains.kotlin.analysis.api.components
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtClassOrObjectSymbol
|
||||
import org.jetbrains.kotlin.resolve.deprecation.DeprecationInfo
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtPropertySymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtSymbol
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget
|
||||
import org.jetbrains.kotlin.descriptors.annotations.KotlinTarget
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.deprecation.DeprecationInfo
|
||||
|
||||
public abstract class KtSymbolInfoProvider : KtAnalysisSessionComponent() {
|
||||
public abstract fun getDeprecation(symbol: KtSymbol): DeprecationInfo?
|
||||
@@ -28,22 +28,21 @@ public abstract class KtSymbolInfoProvider : KtAnalysisSessionComponent() {
|
||||
|
||||
public interface KtSymbolInfoProviderMixIn : KtAnalysisSessionMixIn {
|
||||
/**
|
||||
* Gets the deprecation status of the given symbol. Returns null if the symbol it not deprecated.
|
||||
* Gets the deprecation status of the given symbol. Returns null if the symbol is not deprecated.
|
||||
*/
|
||||
public val KtSymbol.deprecationStatus: DeprecationInfo? get() = withValidityAssertion {
|
||||
analysisSession.symbolInfoProvider.getDeprecation(
|
||||
this
|
||||
)
|
||||
}
|
||||
public val KtSymbol.deprecationStatus: DeprecationInfo?
|
||||
get() = withValidityAssertion {
|
||||
analysisSession.symbolInfoProvider.getDeprecation(this)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the deprecation status of the given symbol. Returns null if the symbol it not deprecated.
|
||||
* Gets the deprecation status of the given symbol. Returns null if the symbol is not deprecated.
|
||||
*/
|
||||
public fun KtSymbol.getDeprecationStatus(annotationUseSiteTarget: AnnotationUseSiteTarget?): DeprecationInfo? =
|
||||
withValidityAssertion { analysisSession.symbolInfoProvider.getDeprecation(this) }
|
||||
withValidityAssertion { analysisSession.symbolInfoProvider.getDeprecation(this, annotationUseSiteTarget) }
|
||||
|
||||
/**
|
||||
* Gets the deprecation status of the getter of this property symbol. Returns null if the getter it not deprecated.
|
||||
* Gets the deprecation status of the getter of this property symbol. Returns null if the getter is not deprecated.
|
||||
*/
|
||||
public val KtPropertySymbol.getterDeprecationStatus: DeprecationInfo?
|
||||
get() = withValidityAssertion { analysisSession.symbolInfoProvider.getGetterDeprecation(this) }
|
||||
@@ -55,16 +54,15 @@ public interface KtSymbolInfoProviderMixIn : KtAnalysisSessionMixIn {
|
||||
public val KtPropertySymbol.setterDeprecationStatus: DeprecationInfo?
|
||||
get() = withValidityAssertion { analysisSession.symbolInfoProvider.getSetterDeprecation(this) }
|
||||
|
||||
public val KtPropertySymbol.javaGetterName: Name get() = withValidityAssertion {
|
||||
analysisSession.symbolInfoProvider.getJavaGetterName(
|
||||
this
|
||||
)
|
||||
}
|
||||
public val KtPropertySymbol.javaSetterName: Name? get() = withValidityAssertion {
|
||||
analysisSession.symbolInfoProvider.getJavaSetterName(
|
||||
this
|
||||
)
|
||||
}
|
||||
public val KtPropertySymbol.javaGetterName: Name
|
||||
get() = withValidityAssertion {
|
||||
analysisSession.symbolInfoProvider.getJavaGetterName(this)
|
||||
}
|
||||
|
||||
public val KtPropertySymbol.javaSetterName: Name?
|
||||
get() = withValidityAssertion {
|
||||
analysisSession.symbolInfoProvider.getJavaSetterName(this)
|
||||
}
|
||||
|
||||
/** Gets the set of applicable targets for an annotation class symbol. Returns `null` if the symbol is not an annotation class. */
|
||||
public val KtClassOrObjectSymbol.annotationApplicableTargets: Set<KotlinTarget>?
|
||||
|
||||
Reference in New Issue
Block a user