org.jetbrains.kotlin.resolve
Class BindingContextUtils
java.lang.Object
org.jetbrains.kotlin.resolve.BindingContextUtils
public class BindingContextUtils
- extends java.lang.Object
Method Summary |
static VariableDescriptor |
extractVariableDescriptorIfAny(BindingContext bindingContext,
KtElement element,
boolean onlyReference)
|
static VariableDescriptor |
extractVariableFromResolvedCall(BindingContext bindingContext,
KtElement callElement)
|
static com.intellij.openapi.util.Pair<FunctionDescriptor,com.intellij.psi.PsiElement> |
getContainingFunctionSkipFunctionLiterals(DeclarationDescriptor startDescriptor,
boolean strict)
|
static ResolvedCall<ConstructorDescriptor> |
getDelegationConstructorCall(BindingContext bindingContext,
ConstructorDescriptor constructorDescriptor)
|
static DeclarationDescriptor |
getEnclosingDescriptor(BindingContext context,
KtElement element)
|
static FunctionDescriptor |
getEnclosingFunctionDescriptor(BindingContext context,
KtElement element)
|
static
|
getNotNull(BindingContext bindingContext,
ReadOnlySlice<K,V> slice,
K key)
|
static
|
getNotNull(BindingContext bindingContext,
ReadOnlySlice<K,V> slice,
K key,
java.lang.String messageIfNull)
|
static KotlinTypeInfo |
getRecordedTypeInfo(KtExpression expression,
BindingContext context)
|
static KotlinType |
getTypeNotNull(BindingContext bindingContext,
KtExpression expression)
|
static boolean |
isExpressionWithValidReference(KtExpression expression,
BindingContext context)
|
static boolean |
isVarCapturedInClosure(BindingContext bindingContext,
DeclarationDescriptor descriptor)
|
static void |
recordFunctionDeclarationToDescriptor(BindingTrace trace,
com.intellij.psi.PsiElement psiElement,
SimpleFunctionDescriptor function)
|
static void |
reportAmbiguousLabel(BindingTrace trace,
KtSimpleNameExpression targetLabel,
java.util.Collection<DeclarationDescriptor> declarationsByLabel)
|
static KotlinType |
updateRecordedType(KotlinType type,
KtExpression expression,
BindingTrace trace,
boolean shouldBeMadeNullable)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extractVariableFromResolvedCall
@Nullable
public static VariableDescriptor extractVariableFromResolvedCall(@NotNull
BindingContext bindingContext,
@Nullable
KtElement callElement)
extractVariableDescriptorIfAny
@Nullable
public static VariableDescriptor extractVariableDescriptorIfAny(@NotNull
BindingContext bindingContext,
@Nullable
KtElement element,
boolean onlyReference)
recordFunctionDeclarationToDescriptor
public static void recordFunctionDeclarationToDescriptor(@NotNull
BindingTrace trace,
@NotNull
com.intellij.psi.PsiElement psiElement,
@NotNull
SimpleFunctionDescriptor function)
getNotNull
@NotNull
public static <K,V> V getNotNull(@NotNull
BindingContext bindingContext,
@NotNull
ReadOnlySlice<K,V> slice,
@NotNull
K key)
getTypeNotNull
@NotNull
public static KotlinType getTypeNotNull(@NotNull
BindingContext bindingContext,
@NotNull
KtExpression expression)
getNotNull
@NotNull
public static <K,V> V getNotNull(@NotNull
BindingContext bindingContext,
@NotNull
ReadOnlySlice<K,V> slice,
@NotNull
K key,
@NotNull
java.lang.String messageIfNull)
getEnclosingDescriptor
@NotNull
public static DeclarationDescriptor getEnclosingDescriptor(@NotNull
BindingContext context,
@NotNull
KtElement element)
getEnclosingFunctionDescriptor
public static FunctionDescriptor getEnclosingFunctionDescriptor(@NotNull
BindingContext context,
@NotNull
KtElement element)
reportAmbiguousLabel
public static void reportAmbiguousLabel(@NotNull
BindingTrace trace,
@NotNull
KtSimpleNameExpression targetLabel,
@NotNull
java.util.Collection<DeclarationDescriptor> declarationsByLabel)
updateRecordedType
@Nullable
public static KotlinType updateRecordedType(@Nullable
KotlinType type,
@NotNull
KtExpression expression,
@NotNull
BindingTrace trace,
boolean shouldBeMadeNullable)
getRecordedTypeInfo
@Nullable
public static KotlinTypeInfo getRecordedTypeInfo(@NotNull
KtExpression expression,
@NotNull
BindingContext context)
isExpressionWithValidReference
public static boolean isExpressionWithValidReference(@NotNull
KtExpression expression,
@NotNull
BindingContext context)
isVarCapturedInClosure
public static boolean isVarCapturedInClosure(BindingContext bindingContext,
DeclarationDescriptor descriptor)
getContainingFunctionSkipFunctionLiterals
@NotNull
public static com.intellij.openapi.util.Pair<FunctionDescriptor,com.intellij.psi.PsiElement> getContainingFunctionSkipFunctionLiterals(@Nullable
DeclarationDescriptor startDescriptor,
boolean strict)
getDelegationConstructorCall
@Nullable
public static ResolvedCall<ConstructorDescriptor> getDelegationConstructorCall(@NotNull
BindingContext bindingContext,
@NotNull
ConstructorDescriptor constructorDescriptor)