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<KtNamedFunction,FunctionDescriptor> functionResolver)
           
 
Method Summary
 KtNamedFunction getMainFunction(java.util.Collection<KtFile> files)
           
 boolean hasMain(java.util.List<KtDeclaration> declarations)
           
static boolean isMain(DeclarationDescriptor descriptor)
           
 boolean isMain(KtNamedFunction 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<KtNamedFunction,FunctionDescriptor> functionResolver)
Method Detail

hasMain

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

isMain

public boolean isMain(@NotNull
                      KtNamedFunction function)

isMain

public static boolean isMain(@NotNull
                             DeclarationDescriptor descriptor)

getMainFunction

@Nullable
public KtNamedFunction getMainFunction(@NotNull
                                                java.util.Collection<KtFile> files)