org.jetbrains.jet.lang.resolve
Class BindingContextUtils

java.lang.Object
  extended by org.jetbrains.jet.lang.resolve.BindingContextUtils

public class BindingContextUtils
extends java.lang.Object


Method Summary
static com.intellij.psi.PsiElement callableDescriptorToDeclaration(BindingContext context, CallableMemberDescriptor callable)
           
static com.intellij.psi.PsiElement classDescriptorToDeclaration(BindingContext context, ClassDescriptor clazz)
           
static com.intellij.psi.PsiElement descriptorToDeclaration(BindingContext context, DeclarationDescriptor descriptor)
           
static java.util.List<com.intellij.psi.PsiElement> descriptorToDeclarations(BindingContext context, DeclarationDescriptor descriptor)
           
static VariableDescriptor extractVariableDescriptorIfAny(BindingContext bindingContext, JetElement element, boolean onlyReference)
           
static JetFile getContainingFile(BindingContext context, DeclarationDescriptor declarationDescriptor)
           
static DeclarationDescriptor getEnclosingDescriptor(BindingContext context, JetElement element)
           
static
<K,V> V
getNotNull(BindingContext bindingContext, ReadOnlySlice<K,V> slice, K key)
           
static
<K,V> V
getNotNull(BindingContext bindingContext, ReadOnlySlice<K,V> slice, K key, java.lang.String messageIfNull)
           
static JetTypeInfo getRecordedTypeInfo(JetExpression expression, BindingContext context)
           
static boolean isCallExpressionWithValidReference(JetExpression expression, BindingContext context)
           
static boolean isExpressionWithValidReference(JetExpression expression, BindingContext context)
           
static NamespaceDescriptor namespaceDescriptor(BindingContext context, JetFile source)
           
static void recordExpressionType(JetExpression expression, BindingTrace trace, JetScope resolutionScope, JetTypeInfo result)
           
static void recordFunctionDeclarationToDescriptor(BindingTrace trace, com.intellij.psi.PsiElement psiElement, SimpleFunctionDescriptor function)
           
static void reportAmbiguousLabel(BindingTrace trace, JetSimpleNameExpression targetLabel, java.util.Collection<DeclarationDescriptor> declarationsByLabel)
           
static com.intellij.psi.PsiElement resolveToDeclarationPsiElement(BindingContext bindingContext, JetReferenceExpression referenceExpression)
           
static java.util.List<com.intellij.psi.PsiElement> resolveToDeclarationPsiElements(BindingContext bindingContext, JetReferenceExpression referenceExpression)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

resolveToDeclarationPsiElement

@Nullable
public static com.intellij.psi.PsiElement resolveToDeclarationPsiElement(@NotNull
                                                                                  BindingContext bindingContext,
                                                                                  @Nullable
                                                                                  JetReferenceExpression referenceExpression)

resolveToDeclarationPsiElements

@NotNull
public static java.util.List<com.intellij.psi.PsiElement> resolveToDeclarationPsiElements(@NotNull
                                                                                                  BindingContext bindingContext,
                                                                                                  @Nullable
                                                                                                  JetReferenceExpression referenceExpression)

extractVariableDescriptorIfAny

@Nullable
public static VariableDescriptor extractVariableDescriptorIfAny(@NotNull
                                                                         BindingContext bindingContext,
                                                                         @Nullable
                                                                         JetElement element,
                                                                         boolean onlyReference)

getContainingFile

@Nullable
public static JetFile getContainingFile(@NotNull
                                                 BindingContext context,
                                                 @NotNull
                                                 DeclarationDescriptor declarationDescriptor)

namespaceDescriptor

@Nullable
public static NamespaceDescriptor namespaceDescriptor(@NotNull
                                                               BindingContext context,
                                                               @NotNull
                                                               JetFile source)

descriptorToDeclaration

@Nullable
public static com.intellij.psi.PsiElement descriptorToDeclaration(@NotNull
                                                                           BindingContext context,
                                                                           @NotNull
                                                                           DeclarationDescriptor descriptor)

descriptorToDeclarations

@NotNull
public static java.util.List<com.intellij.psi.PsiElement> descriptorToDeclarations(@NotNull
                                                                                           BindingContext context,
                                                                                           @NotNull
                                                                                           DeclarationDescriptor descriptor)

callableDescriptorToDeclaration

@Nullable
public static com.intellij.psi.PsiElement callableDescriptorToDeclaration(@NotNull
                                                                                   BindingContext context,
                                                                                   @NotNull
                                                                                   CallableMemberDescriptor callable)

classDescriptorToDeclaration

@Nullable
public static com.intellij.psi.PsiElement classDescriptorToDeclaration(@NotNull
                                                                                BindingContext context,
                                                                                @NotNull
                                                                                ClassDescriptor clazz)

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)

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
                                                                   JetElement element)

reportAmbiguousLabel

public static void reportAmbiguousLabel(@NotNull
                                        BindingTrace trace,
                                        @NotNull
                                        JetSimpleNameExpression targetLabel,
                                        @NotNull
                                        java.util.Collection<DeclarationDescriptor> declarationsByLabel)

recordExpressionType

public static void recordExpressionType(@NotNull
                                        JetExpression expression,
                                        @NotNull
                                        BindingTrace trace,
                                        @NotNull
                                        JetScope resolutionScope,
                                        @NotNull
                                        JetTypeInfo result)

getRecordedTypeInfo

@Nullable
public static JetTypeInfo getRecordedTypeInfo(@NotNull
                                                       JetExpression expression,
                                                       @NotNull
                                                       BindingContext context)

isExpressionWithValidReference

public static boolean isExpressionWithValidReference(@NotNull
                                                     JetExpression expression,
                                                     @NotNull
                                                     BindingContext context)

isCallExpressionWithValidReference

public static boolean isCallExpressionWithValidReference(@NotNull
                                                         JetExpression expression,
                                                         @NotNull
                                                         BindingContext context)