org.jetbrains.kotlin.idea
Class MainFunctionDetector

java.lang.Object
  extended by org.jetbrains.kotlin.idea.MainFunctionDetector

public class MainFunctionDetector
extends java.lang.Object


Constructor Summary
MainFunctionDetector(BindingContext bindingContext)
          Assumes that the function declaration is already resolved and the descriptor can be found in the bindingContext.
MainFunctionDetector(com.intellij.util.NotNullFunction<JetNamedFunction,FunctionDescriptor> functionResolver)
           
 
Method Summary
 JetNamedFunction getMainFunction(java.util.Collection<JetFile> files)
           
 boolean hasMain(java.util.List<JetDeclaration> declarations)
           
 boolean isMain(JetNamedFunction function)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainFunctionDetector

public MainFunctionDetector(@NotNull
                            BindingContext bindingContext)
Assumes that the function declaration is already resolved and the descriptor can be found in the bindingContext.


MainFunctionDetector

public MainFunctionDetector(@NotNull
                            com.intellij.util.NotNullFunction<JetNamedFunction,FunctionDescriptor> functionResolver)
Method Detail

hasMain

public boolean hasMain(@NotNull
                       java.util.List<JetDeclaration> declarations)

isMain

public boolean isMain(@NotNull
                      JetNamedFunction function)

getMainFunction

@Nullable
public JetNamedFunction getMainFunction(@NotNull
                                                 java.util.Collection<JetFile> files)