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.di; 018 019import org.jetbrains.jet.lang.resolve.BodyResolver; 020import org.jetbrains.jet.lang.resolve.calls.NeedSyntheticCallResolverExtension; 021import com.intellij.openapi.project.Project; 022import org.jetbrains.jet.lang.resolve.TopDownAnalysisParameters; 023import org.jetbrains.jet.lang.resolve.BindingTrace; 024import org.jetbrains.jet.lang.resolve.BodiesResolveContext; 025import org.jetbrains.jet.lang.descriptors.ModuleDescriptor; 026import org.jetbrains.jet.lang.resolve.calls.CallResolver; 027import org.jetbrains.jet.lang.resolve.calls.ArgumentTypeResolver; 028import org.jetbrains.jet.lang.types.expressions.ExpressionTypingServices; 029import org.jetbrains.jet.lang.resolve.calls.CallExpressionResolver; 030import org.jetbrains.jet.lang.resolve.DescriptorResolver; 031import org.jetbrains.jet.lang.resolve.AnnotationResolver; 032import org.jetbrains.jet.lang.resolve.TypeResolver; 033import org.jetbrains.jet.lang.resolve.QualifiedExpressionResolver; 034import org.jetbrains.jet.lang.resolve.calls.CandidateResolver; 035import org.jetbrains.jet.lang.resolve.ControlFlowAnalyzer; 036import org.jetbrains.jet.lang.resolve.DeclarationsChecker; 037import org.jetbrains.jet.lang.resolve.ScriptBodyResolver; 038import org.jetbrains.jet.lang.resolve.TopDownAnalysisContext; 039import org.jetbrains.annotations.NotNull; 040import javax.annotation.PreDestroy; 041 042/* This file is generated by org.jetbrains.jet.generators.injectors.GenerateInjectors. DO NOT EDIT! */ 043public class InjectorForBodyResolve { 044 045 private BodyResolver bodyResolver; 046 private NeedSyntheticCallResolverExtension needSyntheticCallResolverExtension; 047 private final Project project; 048 private final TopDownAnalysisParameters topDownAnalysisParameters; 049 private final BindingTrace bindingTrace; 050 private final BodiesResolveContext bodiesResolveContext; 051 private final ModuleDescriptor moduleDescriptor; 052 private CallResolver callResolver; 053 private ArgumentTypeResolver argumentTypeResolver; 054 private ExpressionTypingServices expressionTypingServices; 055 private CallExpressionResolver callExpressionResolver; 056 private DescriptorResolver descriptorResolver; 057 private AnnotationResolver annotationResolver; 058 private TypeResolver typeResolver; 059 private QualifiedExpressionResolver qualifiedExpressionResolver; 060 private CandidateResolver candidateResolver; 061 private ControlFlowAnalyzer controlFlowAnalyzer; 062 private DeclarationsChecker declarationsChecker; 063 private ScriptBodyResolver scriptBodyResolver; 064 private TopDownAnalysisContext topDownAnalysisContext; 065 066 public InjectorForBodyResolve( 067 @NotNull Project project, 068 @NotNull TopDownAnalysisParameters topDownAnalysisParameters, 069 @NotNull BindingTrace bindingTrace, 070 @NotNull BodiesResolveContext bodiesResolveContext, 071 @NotNull ModuleDescriptor moduleDescriptor 072 ) { 073 this.bodyResolver = new BodyResolver(); 074 this.needSyntheticCallResolverExtension = new NeedSyntheticCallResolverExtension(); 075 this.project = project; 076 this.topDownAnalysisParameters = topDownAnalysisParameters; 077 this.bindingTrace = bindingTrace; 078 this.bodiesResolveContext = bodiesResolveContext; 079 this.moduleDescriptor = moduleDescriptor; 080 this.callResolver = new CallResolver(); 081 this.argumentTypeResolver = new ArgumentTypeResolver(); 082 this.expressionTypingServices = new ExpressionTypingServices(); 083 this.callExpressionResolver = new CallExpressionResolver(); 084 this.descriptorResolver = new DescriptorResolver(); 085 this.annotationResolver = new AnnotationResolver(); 086 this.typeResolver = new TypeResolver(); 087 this.qualifiedExpressionResolver = new QualifiedExpressionResolver(); 088 this.candidateResolver = new CandidateResolver(); 089 this.controlFlowAnalyzer = new ControlFlowAnalyzer(); 090 this.declarationsChecker = new DeclarationsChecker(); 091 this.scriptBodyResolver = new ScriptBodyResolver(); 092 this.topDownAnalysisContext = new TopDownAnalysisContext(); 093 094 this.bodyResolver.setCallResolver(callResolver); 095 this.bodyResolver.setContext(bodiesResolveContext); 096 this.bodyResolver.setControlFlowAnalyzer(controlFlowAnalyzer); 097 this.bodyResolver.setDeclarationsChecker(declarationsChecker); 098 this.bodyResolver.setDescriptorResolver(descriptorResolver); 099 this.bodyResolver.setExpressionTypingServices(expressionTypingServices); 100 this.bodyResolver.setScriptBodyResolverResolver(scriptBodyResolver); 101 this.bodyResolver.setTopDownAnalysisParameters(topDownAnalysisParameters); 102 this.bodyResolver.setTrace(bindingTrace); 103 104 callResolver.setArgumentTypeResolver(argumentTypeResolver); 105 callResolver.setCandidateResolver(candidateResolver); 106 callResolver.setExpressionTypingServices(expressionTypingServices); 107 callResolver.setExtension(needSyntheticCallResolverExtension); 108 callResolver.setTypeResolver(typeResolver); 109 110 argumentTypeResolver.setExpressionTypingServices(expressionTypingServices); 111 argumentTypeResolver.setTypeResolver(typeResolver); 112 113 expressionTypingServices.setCallExpressionResolver(callExpressionResolver); 114 expressionTypingServices.setCallResolver(callResolver); 115 expressionTypingServices.setDescriptorResolver(descriptorResolver); 116 expressionTypingServices.setProject(project); 117 expressionTypingServices.setTypeResolver(typeResolver); 118 119 callExpressionResolver.setExpressionTypingServices(expressionTypingServices); 120 121 descriptorResolver.setAnnotationResolver(annotationResolver); 122 descriptorResolver.setExpressionTypingServices(expressionTypingServices); 123 descriptorResolver.setTypeResolver(typeResolver); 124 125 annotationResolver.setCallResolver(callResolver); 126 annotationResolver.setExpressionTypingServices(expressionTypingServices); 127 128 typeResolver.setAnnotationResolver(annotationResolver); 129 typeResolver.setDescriptorResolver(descriptorResolver); 130 typeResolver.setModuleDescriptor(moduleDescriptor); 131 typeResolver.setQualifiedExpressionResolver(qualifiedExpressionResolver); 132 133 candidateResolver.setArgumentTypeResolver(argumentTypeResolver); 134 135 controlFlowAnalyzer.setTopDownAnalysisParameters(topDownAnalysisParameters); 136 controlFlowAnalyzer.setTrace(bindingTrace); 137 138 declarationsChecker.setTrace(bindingTrace); 139 140 scriptBodyResolver.setContext(topDownAnalysisContext); 141 scriptBodyResolver.setExpressionTypingServices(expressionTypingServices); 142 scriptBodyResolver.setTrace(bindingTrace); 143 144 topDownAnalysisContext.setTopDownAnalysisParameters(topDownAnalysisParameters); 145 146 } 147 148 @PreDestroy 149 public void destroy() { 150 } 151 152 public BodyResolver getBodyResolver() { 153 return this.bodyResolver; 154 } 155 156 public Project getProject() { 157 return this.project; 158 } 159 160 public TopDownAnalysisParameters getTopDownAnalysisParameters() { 161 return this.topDownAnalysisParameters; 162 } 163 164 public BindingTrace getBindingTrace() { 165 return this.bindingTrace; 166 } 167 168 public BodiesResolveContext getBodiesResolveContext() { 169 return this.bodiesResolveContext; 170 } 171 172}