org.jetbrains.jet.lang.resolve
Class FunctionDescriptorUtil

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

public class FunctionDescriptorUtil
extends java.lang.Object


Method Summary
static
<D extends CallableDescriptor>
D
alphaConvertTypeParameters(D candidate)
           
static java.util.Map<TypeConstructor,TypeProjection> createSubstitutionContext(FunctionDescriptor functionDescriptor, java.util.List<JetType> typeArguments)
           
static JetScope getFunctionInnerScope(JetScope outerScope, FunctionDescriptor descriptor, BindingTrace trace)
           
static void initializeFromFunctionType(FunctionDescriptorImpl functionDescriptor, JetType functionType, ReceiverParameterDescriptor expectedThisObject, Modality modality, Visibility visibility)
           
static FunctionDescriptor replaceFunctionParameters(FunctionDescriptor function, java.util.List<ValueParameterDescriptor> newParameters)
          Returns function's copy with new parameter list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSubstitutionContext

public static java.util.Map<TypeConstructor,TypeProjection> createSubstitutionContext(@NotNull
                                                                                      FunctionDescriptor functionDescriptor,
                                                                                      java.util.List<JetType> typeArguments)

getFunctionInnerScope

@NotNull
public static JetScope getFunctionInnerScope(@NotNull
                                                     JetScope outerScope,
                                                     @NotNull
                                                     FunctionDescriptor descriptor,
                                                     @NotNull
                                                     BindingTrace trace)

initializeFromFunctionType

public static void initializeFromFunctionType(@NotNull
                                              FunctionDescriptorImpl functionDescriptor,
                                              @NotNull
                                              JetType functionType,
                                              @Nullable
                                              ReceiverParameterDescriptor expectedThisObject,
                                              @NotNull
                                              Modality modality,
                                              @NotNull
                                              Visibility visibility)

alphaConvertTypeParameters

public static <D extends CallableDescriptor> D alphaConvertTypeParameters(D candidate)

replaceFunctionParameters

@NotNull
public static FunctionDescriptor replaceFunctionParameters(@NotNull
                                                                   FunctionDescriptor function,
                                                                   @NotNull
                                                                   java.util.List<ValueParameterDescriptor> newParameters)
Returns function's copy with new parameter list. Note that parameters may belong to other methods or have incorrect "index" property -- it will be fixed by this function.