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 java.util.List<com.intellij.psi.PsiElement> callableDescriptorToDeclarations(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
<T extends CallableMemberDescriptor>
java.util.Set<T>
getAllOverriddenDeclarations(T memberDescriptor)
           
static JetFile getContainingFile(BindingContext context, DeclarationDescriptor declarationDescriptor)
           
static java.util.Set<CallableMemberDescriptor> getDirectlyOverriddenDeclarations(CallableMemberDescriptor descriptor)
           
static java.util.Set<FunctionDescriptor> getDirectlyOverriddenDeclarations(FunctionDescriptor descriptor)
           
static java.util.Set<PropertyDescriptor> getDirectlyOverriddenDeclarations(PropertyDescriptor descriptor)
           
static DeclarationDescriptor getEnclosingDescriptor(BindingContext context, JetElement element)
           
static FunctionDescriptor getEnclosingFunctionDescriptor(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 void recordFunctionDeclarationToDescriptor(BindingTrace trace, com.intellij.psi.PsiElement psiElement, SimpleFunctionDescriptor function)
           
static void reportAmbiguousLabel(BindingTrace trace, JetSimpleNameExpression targetLabel, java.util.Collection<DeclarationDescriptor> declarationsByLabel)
           
static JetType updateRecordedType(JetType type, JetExpression expression, BindingTrace trace, boolean shouldBeMadeNullable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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)

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)

callableDescriptorToDeclarations

@NotNull
public static java.util.List<com.intellij.psi.PsiElement> callableDescriptorToDeclarations(@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)

getEnclosingFunctionDescriptor

public static FunctionDescriptor getEnclosingFunctionDescriptor(@NotNull
                                                                BindingContext context,
                                                                @NotNull
                                                                JetElement element)

reportAmbiguousLabel

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

updateRecordedType

@Nullable
public static JetType updateRecordedType(@Nullable
                                                  JetType type,
                                                  @NotNull
                                                  JetExpression expression,
                                                  @NotNull
                                                  BindingTrace trace,
                                                  boolean shouldBeMadeNullable)

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)

getDirectlyOverriddenDeclarations

@NotNull
public static java.util.Set<CallableMemberDescriptor> getDirectlyOverriddenDeclarations(@NotNull
                                                                                                CallableMemberDescriptor descriptor)

getDirectlyOverriddenDeclarations

@NotNull
public static java.util.Set<FunctionDescriptor> getDirectlyOverriddenDeclarations(@NotNull
                                                                                          FunctionDescriptor descriptor)

getDirectlyOverriddenDeclarations

@NotNull
public static java.util.Set<PropertyDescriptor> getDirectlyOverriddenDeclarations(@NotNull
                                                                                          PropertyDescriptor descriptor)

getAllOverriddenDeclarations

@NotNull
public static <T extends CallableMemberDescriptor> java.util.Set<T> getAllOverriddenDeclarations(@NotNull
                                                                                                         T memberDescriptor)