use of org.jetbrains.kotlin.psi.stubs.KotlinTypeProjectionStub in project kotlin by JetBrains.
the class KtTypeProjection method getProjectionKind.
@NotNull
public KtProjectionKind getProjectionKind() {
KotlinTypeProjectionStub stub = getStub();
if (stub != null) {
return stub.getProjectionKind();
}
PsiElement projectionToken = getProjectionToken();
IElementType token = projectionToken != null ? projectionToken.getNode().getElementType() : null;
for (KtProjectionKind projectionKind : KtProjectionKind.values()) {
if (projectionKind.getToken() == token) {
return projectionKind;
}
}
throw new IllegalStateException(projectionToken.getText());
}
Aggregations