001/*
002 * Copyright 2010-2013 JetBrains s.r.o.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.jetbrains.jet.analyzer;
018
019import com.google.common.base.Predicate;
020import com.intellij.openapi.project.Project;
021import com.intellij.psi.PsiFile;
022import org.jetbrains.annotations.NotNull;
023import org.jetbrains.jet.lang.descriptors.ModuleDescriptor;
024import org.jetbrains.jet.lang.psi.JetFile;
025import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
026import org.jetbrains.jet.lang.resolve.BindingTrace;
027import org.jetbrains.jet.lang.resolve.BodiesResolveContext;
028import org.jetbrains.jet.lang.resolve.lazy.ResolveSession;
029
030import java.util.Collection;
031import java.util.List;
032
033public interface AnalyzerFacade {
034
035    @NotNull
036    AnalyzeExhaust analyzeFiles(
037            @NotNull Project project,
038            @NotNull Collection<JetFile> files,
039            @NotNull List<AnalyzerScriptParameter> scriptParameters,
040            @NotNull Predicate<PsiFile> filesToAnalyzeCompletely
041    );
042
043    @NotNull
044    AnalyzeExhaust analyzeBodiesInFiles(
045            @NotNull Project project,
046            @NotNull List<AnalyzerScriptParameter> scriptParameters,
047            @NotNull Predicate<PsiFile> filesForBodiesResolve,
048            @NotNull BindingTrace traceContext,
049            @NotNull BodiesResolveContext bodiesResolveContext,
050            @NotNull ModuleDescriptor module
051    );
052
053    @NotNull
054    ResolveSession getLazyResolveSession(
055            @NotNull Project project,
056            @NotNull Collection<JetFile> files
057    );
058}