[analysis api] rename KtSignature -> KtCallableSignature
This commit is contained in:
@@ -147,7 +147,7 @@ public class KtGenericTypeQualifier(
|
||||
* properties, the missing information is the type of access (read, write, or compound access) to this property. For functions, the missing
|
||||
* information is the value arguments for the call.
|
||||
*/
|
||||
public class KtPartiallyAppliedSymbol<out S : KtCallableSymbol, out C : KtSignature<S>>(
|
||||
public class KtPartiallyAppliedSymbol<out S : KtCallableSymbol, out C : KtCallableSignature<S>>(
|
||||
private val _signature: C,
|
||||
private val _dispatchReceiver: KtReceiverValue?,
|
||||
private val _extensionReceiver: KtReceiverValue?,
|
||||
@@ -171,7 +171,7 @@ public class KtPartiallyAppliedSymbol<out S : KtCallableSymbol, out C : KtSignat
|
||||
public val extensionReceiver: KtReceiverValue? get() = withValidityAssertion { _extensionReceiver }
|
||||
}
|
||||
|
||||
public val <S : KtCallableSymbol, C : KtSignature<S>> KtPartiallyAppliedSymbol<S, C>.symbol: S get() = signature.symbol
|
||||
public val <S : KtCallableSymbol, C : KtCallableSignature<S>> KtPartiallyAppliedSymbol<S, C>.symbol: S get() = signature.symbol
|
||||
|
||||
/**
|
||||
* A synthetic call to assert an expression is not null. For example
|
||||
@@ -191,11 +191,11 @@ public class KtCheckNotNullCall(
|
||||
/**
|
||||
* A call to a function, or a simple/compound access to a property.
|
||||
*/
|
||||
public sealed class KtCallableMemberCall<S : KtCallableSymbol, C : KtSignature<S>> : KtCall() {
|
||||
public sealed class KtCallableMemberCall<S : KtCallableSymbol, C : KtCallableSignature<S>> : KtCall() {
|
||||
public abstract val partiallyAppliedSymbol: KtPartiallyAppliedSymbol<S, C>
|
||||
}
|
||||
|
||||
public val <S : KtCallableSymbol, C : KtSignature<S>> KtCallableMemberCall<S, C>.symbol: S get() = partiallyAppliedSymbol.symbol
|
||||
public val <S : KtCallableSymbol, C : KtCallableSignature<S>> KtCallableMemberCall<S, C>.symbol: S get() = partiallyAppliedSymbol.symbol
|
||||
|
||||
public sealed class KtFunctionCall<S : KtFunctionLikeSymbol>(
|
||||
private val _argumentMapping: LinkedHashMap<KtExpression, KtVariableLikeSignature<KtValueParameterSymbol>>,
|
||||
|
||||
+10
-10
@@ -11,9 +11,9 @@ import org.jetbrains.kotlin.analysis.api.types.KtSubstitutor
|
||||
|
||||
public abstract class KtSignatureSubsitutor : KtAnalysisSessionComponent() {
|
||||
public abstract fun <S : KtCallableSymbol> substitute(
|
||||
signature: KtSignature<S>,
|
||||
signature: KtCallableSignature<S>,
|
||||
substitutor: KtSubstitutor
|
||||
): KtSignature<S>
|
||||
): KtCallableSignature<S>
|
||||
|
||||
public abstract fun <S : KtFunctionLikeSymbol> substitute(
|
||||
signature: KtFunctionLikeSignature<S>,
|
||||
@@ -25,13 +25,13 @@ public abstract class KtSignatureSubsitutor : KtAnalysisSessionComponent() {
|
||||
substitutor: KtSubstitutor
|
||||
): KtVariableLikeSignature<S>
|
||||
|
||||
public abstract fun <S : KtCallableSymbol> substitute(symbol: S, substitutor: KtSubstitutor): KtSignature<S>
|
||||
public abstract fun <S : KtCallableSymbol> substitute(symbol: S, substitutor: KtSubstitutor): KtCallableSignature<S>
|
||||
|
||||
public abstract fun <S : KtFunctionLikeSymbol> substitute(symbol: S, substitutor: KtSubstitutor): KtFunctionLikeSignature<S>
|
||||
|
||||
public abstract fun <S : KtVariableLikeSymbol> substitute(symbol: S, substitutor: KtSubstitutor): KtVariableLikeSignature<S>
|
||||
|
||||
public abstract fun <S : KtCallableSymbol> asSignature(symbol: S): KtSignature<S>
|
||||
public abstract fun <S : KtCallableSymbol> asSignature(symbol: S): KtCallableSignature<S>
|
||||
|
||||
public abstract fun <S : KtFunctionLikeSymbol> asSignature(symbol: S): KtFunctionLikeSignature<S>
|
||||
|
||||
@@ -44,7 +44,7 @@ public interface KtSignatureSubsitutorMixIn : KtAnalysisSessionMixIn {
|
||||
*
|
||||
* @see KtSubstitutor.substituteOrSelf
|
||||
*/
|
||||
public fun <S : KtCallableSymbol> KtSignature<S>.substitute(substitutor: KtSubstitutor): KtSignature<S> =
|
||||
public fun <S : KtCallableSymbol> KtCallableSignature<S>.substitute(substitutor: KtSubstitutor): KtCallableSignature<S> =
|
||||
withValidityAssertion { analysisSession.substitutionProvider.substitute(this, substitutor) }
|
||||
|
||||
/**
|
||||
@@ -68,7 +68,7 @@ public interface KtSignatureSubsitutorMixIn : KtAnalysisSessionMixIn {
|
||||
*
|
||||
* @see KtSubstitutor.substituteOrSelf
|
||||
*/
|
||||
public fun <S : KtCallableSymbol> S.substitute(substitutor: KtSubstitutor): KtSignature<S> =
|
||||
public fun <S : KtCallableSymbol> S.substitute(substitutor: KtSubstitutor): KtCallableSignature<S> =
|
||||
withValidityAssertion { analysisSession.substitutionProvider.substitute(this, substitutor) }
|
||||
|
||||
/**
|
||||
@@ -88,19 +88,19 @@ public interface KtSignatureSubsitutorMixIn : KtAnalysisSessionMixIn {
|
||||
withValidityAssertion { analysisSession.substitutionProvider.substitute(this, substitutor) }
|
||||
|
||||
/**
|
||||
* Creates a new [KtSignature] by given symbol and leave all types intact
|
||||
* Creates a new [KtCallableSignature] by given symbol and leave all types intact
|
||||
*/
|
||||
public fun <S : KtCallableSymbol> S.asSignature(): KtSignature<S> =
|
||||
public fun <S : KtCallableSymbol> S.asSignature(): KtCallableSignature<S> =
|
||||
withValidityAssertion { analysisSession.substitutionProvider.asSignature(this) }
|
||||
|
||||
/**
|
||||
* Creates a new [KtSignature] by given symbol and leave all types intact
|
||||
* Creates a new [KtCallableSignature] by given symbol and leave all types intact
|
||||
*/
|
||||
public fun <S : KtFunctionLikeSymbol> S.asSignature(): KtFunctionLikeSignature<S> =
|
||||
withValidityAssertion { analysisSession.substitutionProvider.asSignature(this) }
|
||||
|
||||
/**
|
||||
* Creates a new [KtSignature] by given symbol and leave all types intact
|
||||
* Creates a new [KtCallableSignature] by given symbol and leave all types intact
|
||||
*/
|
||||
public fun <S : KtVariableLikeSymbol> S.asSignature(): KtVariableLikeSignature<S> =
|
||||
withValidityAssertion { analysisSession.substitutionProvider.asSignature(this) }
|
||||
|
||||
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.analysis.api.scopes
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtCallableSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtClassifierSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtConstructorSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtSignature
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtCallableSignature
|
||||
|
||||
|
||||
public interface KtTypeScope : KtScopeLike {
|
||||
@@ -16,7 +16,7 @@ public interface KtTypeScope : KtScopeLike {
|
||||
/**
|
||||
* Return a sequence of [KtCallableSymbol] which current scope contain if declaration name matches [nameFilter]
|
||||
*/
|
||||
public fun getCallableSignatures(nameFilter: KtScopeNameFilter = { true }): Sequence<KtSignature<*>>
|
||||
public fun getCallableSignatures(nameFilter: KtScopeNameFilter = { true }): Sequence<KtCallableSignature<*>>
|
||||
|
||||
/**
|
||||
* Return a sequence of [KtClassifierSymbol] which current scope contain if declaration name matches [nameFilter]
|
||||
|
||||
+4
-4
@@ -27,9 +27,9 @@ import org.jetbrains.kotlin.utils.addToStdlib.runIf
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Equality of [KtSignature] is derived from its content.
|
||||
* Equality of [KtCallableSignature] is derived from its content.
|
||||
*/
|
||||
public sealed class KtSignature<out S : KtCallableSymbol> : KtLifetimeOwner {
|
||||
public sealed class KtCallableSignature<out S : KtCallableSymbol> : KtLifetimeOwner {
|
||||
/**
|
||||
* The original symbol for this signature.
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public data class KtFunctionLikeSignature<out S : KtFunctionLikeSymbol>(
|
||||
private val _returnType: KtType,
|
||||
private val _receiverType: KtType?,
|
||||
private val _valueParameters: List<KtVariableLikeSignature<KtValueParameterSymbol>>,
|
||||
) : KtSignature<S>() {
|
||||
) : KtCallableSignature<S>() {
|
||||
override val token: KtLifetimeToken
|
||||
get() = _symbol.token
|
||||
override val symbol: S
|
||||
@@ -81,7 +81,7 @@ public data class KtVariableLikeSignature<out S : KtVariableLikeSymbol>(
|
||||
private val _symbol: S,
|
||||
private val _returnType: KtType,
|
||||
private val _receiverType: KtType?,
|
||||
) : KtSignature<S>() {
|
||||
) : KtCallableSignature<S>() {
|
||||
override val token: KtLifetimeToken
|
||||
get() = _symbol.token
|
||||
override val symbol: S
|
||||
Reference in New Issue
Block a user