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.TopDownAnalyzer; 020import org.jetbrains.jet.lang.resolve.TopDownAnalysisContext; 021import org.jetbrains.jet.lang.resolve.BodyResolver; 022import org.jetbrains.jet.lang.resolve.ControlFlowAnalyzer; 023import org.jetbrains.jet.lang.resolve.DeclarationsChecker; 024import org.jetbrains.jet.lang.resolve.DescriptorResolver; 025import org.jetbrains.jet.lang.resolve.calls.NeedSyntheticCallResolverExtension; 026import com.intellij.openapi.project.Project; 027import org.jetbrains.jet.lang.resolve.TopDownAnalysisParameters; 028import org.jetbrains.jet.lang.resolve.BindingTrace; 029import org.jetbrains.jet.lang.descriptors.ModuleDescriptorImpl; 030import org.jetbrains.jet.lang.types.DependencyClassByQualifiedNameResolverDummyImpl; 031import org.jetbrains.jet.lang.resolve.NamespaceFactoryImpl; 032import org.jetbrains.jet.lang.resolve.DeclarationResolver; 033import org.jetbrains.jet.lang.resolve.AnnotationResolver; 034import org.jetbrains.jet.lang.resolve.calls.CallResolver; 035import org.jetbrains.jet.lang.resolve.calls.ArgumentTypeResolver; 036import org.jetbrains.jet.lang.types.expressions.ExpressionTypingServices; 037import org.jetbrains.jet.lang.resolve.calls.CallExpressionResolver; 038import org.jetbrains.jet.lang.resolve.TypeResolver; 039import org.jetbrains.jet.lang.resolve.QualifiedExpressionResolver; 040import org.jetbrains.jet.lang.resolve.calls.CandidateResolver; 041import org.jetbrains.jet.lang.resolve.ImportsResolver; 042import org.jetbrains.jet.lang.psi.JetImportsFactory; 043import org.jetbrains.jet.lang.resolve.ScriptHeaderResolver; 044import org.jetbrains.jet.lang.resolve.OverloadResolver; 045import org.jetbrains.jet.lang.resolve.OverrideResolver; 046import org.jetbrains.jet.lang.resolve.TypeHierarchyResolver; 047import org.jetbrains.jet.lang.resolve.ScriptBodyResolver; 048import org.jetbrains.annotations.NotNull; 049import javax.annotation.PreDestroy; 050 051/* This file is generated by org.jetbrains.jet.generators.injectors.GenerateInjectors. DO NOT EDIT! */ 052public class InjectorForTopDownAnalyzerBasic { 053 054 private TopDownAnalyzer topDownAnalyzer; 055 private TopDownAnalysisContext topDownAnalysisContext; 056 private BodyResolver bodyResolver; 057 private ControlFlowAnalyzer controlFlowAnalyzer; 058 private DeclarationsChecker declarationsChecker; 059 private DescriptorResolver descriptorResolver; 060 private NeedSyntheticCallResolverExtension needSyntheticCallResolverExtension; 061 private final Project project; 062 private final TopDownAnalysisParameters topDownAnalysisParameters; 063 private final BindingTrace bindingTrace; 064 private final ModuleDescriptorImpl moduleDescriptor; 065 private DependencyClassByQualifiedNameResolverDummyImpl dependencyClassByQualifiedNameResolverDummy; 066 private NamespaceFactoryImpl namespaceFactory; 067 private DeclarationResolver declarationResolver; 068 private AnnotationResolver annotationResolver; 069 private CallResolver callResolver; 070 private ArgumentTypeResolver argumentTypeResolver; 071 private ExpressionTypingServices expressionTypingServices; 072 private CallExpressionResolver callExpressionResolver; 073 private TypeResolver typeResolver; 074 private QualifiedExpressionResolver qualifiedExpressionResolver; 075 private CandidateResolver candidateResolver; 076 private ImportsResolver importsResolver; 077 private JetImportsFactory jetImportsFactory; 078 private ScriptHeaderResolver scriptHeaderResolver; 079 private OverloadResolver overloadResolver; 080 private OverrideResolver overrideResolver; 081 private TypeHierarchyResolver typeHierarchyResolver; 082 private ScriptBodyResolver scriptBodyResolver; 083 084 public InjectorForTopDownAnalyzerBasic( 085 @NotNull Project project, 086 @NotNull TopDownAnalysisParameters topDownAnalysisParameters, 087 @NotNull BindingTrace bindingTrace, 088 @NotNull ModuleDescriptorImpl moduleDescriptor 089 ) { 090 this.topDownAnalyzer = new TopDownAnalyzer(); 091 this.topDownAnalysisContext = new TopDownAnalysisContext(); 092 this.bodyResolver = new BodyResolver(); 093 this.controlFlowAnalyzer = new ControlFlowAnalyzer(); 094 this.declarationsChecker = new DeclarationsChecker(); 095 this.descriptorResolver = new DescriptorResolver(); 096 this.needSyntheticCallResolverExtension = new NeedSyntheticCallResolverExtension(); 097 this.project = project; 098 this.topDownAnalysisParameters = topDownAnalysisParameters; 099 this.bindingTrace = bindingTrace; 100 this.moduleDescriptor = moduleDescriptor; 101 this.dependencyClassByQualifiedNameResolverDummy = new DependencyClassByQualifiedNameResolverDummyImpl(); 102 this.namespaceFactory = new NamespaceFactoryImpl(); 103 this.declarationResolver = new DeclarationResolver(); 104 this.annotationResolver = new AnnotationResolver(); 105 this.callResolver = new CallResolver(); 106 this.argumentTypeResolver = new ArgumentTypeResolver(); 107 this.expressionTypingServices = new ExpressionTypingServices(); 108 this.callExpressionResolver = new CallExpressionResolver(); 109 this.typeResolver = new TypeResolver(); 110 this.qualifiedExpressionResolver = new QualifiedExpressionResolver(); 111 this.candidateResolver = new CandidateResolver(); 112 this.importsResolver = new ImportsResolver(); 113 this.jetImportsFactory = new JetImportsFactory(); 114 this.scriptHeaderResolver = new ScriptHeaderResolver(); 115 this.overloadResolver = new OverloadResolver(); 116 this.overrideResolver = new OverrideResolver(); 117 this.typeHierarchyResolver = new TypeHierarchyResolver(); 118 this.scriptBodyResolver = new ScriptBodyResolver(); 119 120 this.topDownAnalyzer.setBodyResolver(bodyResolver); 121 this.topDownAnalyzer.setContext(topDownAnalysisContext); 122 this.topDownAnalyzer.setDeclarationResolver(declarationResolver); 123 this.topDownAnalyzer.setModuleDescriptor(moduleDescriptor); 124 this.topDownAnalyzer.setNamespaceFactory(namespaceFactory); 125 this.topDownAnalyzer.setOverloadResolver(overloadResolver); 126 this.topDownAnalyzer.setOverrideResolver(overrideResolver); 127 this.topDownAnalyzer.setTopDownAnalysisParameters(topDownAnalysisParameters); 128 this.topDownAnalyzer.setTrace(bindingTrace); 129 this.topDownAnalyzer.setTypeHierarchyResolver(typeHierarchyResolver); 130 131 this.topDownAnalysisContext.setTopDownAnalysisParameters(topDownAnalysisParameters); 132 133 this.bodyResolver.setCallResolver(callResolver); 134 this.bodyResolver.setContext(topDownAnalysisContext); 135 this.bodyResolver.setControlFlowAnalyzer(controlFlowAnalyzer); 136 this.bodyResolver.setDeclarationsChecker(declarationsChecker); 137 this.bodyResolver.setDescriptorResolver(descriptorResolver); 138 this.bodyResolver.setExpressionTypingServices(expressionTypingServices); 139 this.bodyResolver.setScriptBodyResolverResolver(scriptBodyResolver); 140 this.bodyResolver.setTopDownAnalysisParameters(topDownAnalysisParameters); 141 this.bodyResolver.setTrace(bindingTrace); 142 143 this.controlFlowAnalyzer.setTopDownAnalysisParameters(topDownAnalysisParameters); 144 this.controlFlowAnalyzer.setTrace(bindingTrace); 145 146 this.declarationsChecker.setTrace(bindingTrace); 147 148 this.descriptorResolver.setAnnotationResolver(annotationResolver); 149 this.descriptorResolver.setExpressionTypingServices(expressionTypingServices); 150 this.descriptorResolver.setTypeResolver(typeResolver); 151 152 namespaceFactory.setModuleDescriptor(moduleDescriptor); 153 namespaceFactory.setTrace(bindingTrace); 154 155 declarationResolver.setAnnotationResolver(annotationResolver); 156 declarationResolver.setContext(topDownAnalysisContext); 157 declarationResolver.setDescriptorResolver(descriptorResolver); 158 declarationResolver.setImportsResolver(importsResolver); 159 declarationResolver.setScriptHeaderResolver(scriptHeaderResolver); 160 declarationResolver.setTrace(bindingTrace); 161 162 annotationResolver.setCallResolver(callResolver); 163 annotationResolver.setExpressionTypingServices(expressionTypingServices); 164 165 callResolver.setArgumentTypeResolver(argumentTypeResolver); 166 callResolver.setCandidateResolver(candidateResolver); 167 callResolver.setExpressionTypingServices(expressionTypingServices); 168 callResolver.setExtension(needSyntheticCallResolverExtension); 169 callResolver.setTypeResolver(typeResolver); 170 171 argumentTypeResolver.setExpressionTypingServices(expressionTypingServices); 172 argumentTypeResolver.setTypeResolver(typeResolver); 173 174 expressionTypingServices.setCallExpressionResolver(callExpressionResolver); 175 expressionTypingServices.setCallResolver(callResolver); 176 expressionTypingServices.setDescriptorResolver(descriptorResolver); 177 expressionTypingServices.setProject(project); 178 expressionTypingServices.setTypeResolver(typeResolver); 179 180 callExpressionResolver.setExpressionTypingServices(expressionTypingServices); 181 182 typeResolver.setAnnotationResolver(annotationResolver); 183 typeResolver.setDescriptorResolver(descriptorResolver); 184 typeResolver.setModuleDescriptor(moduleDescriptor); 185 typeResolver.setQualifiedExpressionResolver(qualifiedExpressionResolver); 186 187 candidateResolver.setArgumentTypeResolver(argumentTypeResolver); 188 189 importsResolver.setContext(topDownAnalysisContext); 190 importsResolver.setImportsFactory(jetImportsFactory); 191 importsResolver.setModuleDescriptor(moduleDescriptor); 192 importsResolver.setQualifiedExpressionResolver(qualifiedExpressionResolver); 193 importsResolver.setTrace(bindingTrace); 194 195 jetImportsFactory.setProject(project); 196 197 scriptHeaderResolver.setContext(topDownAnalysisContext); 198 scriptHeaderResolver.setDependencyClassByQualifiedNameResolver(dependencyClassByQualifiedNameResolverDummy); 199 scriptHeaderResolver.setNamespaceFactory(namespaceFactory); 200 scriptHeaderResolver.setTopDownAnalysisParameters(topDownAnalysisParameters); 201 scriptHeaderResolver.setTrace(bindingTrace); 202 203 overloadResolver.setContext(topDownAnalysisContext); 204 overloadResolver.setTrace(bindingTrace); 205 206 overrideResolver.setContext(topDownAnalysisContext); 207 overrideResolver.setTopDownAnalysisParameters(topDownAnalysisParameters); 208 overrideResolver.setTrace(bindingTrace); 209 210 typeHierarchyResolver.setContext(topDownAnalysisContext); 211 typeHierarchyResolver.setDescriptorResolver(descriptorResolver); 212 typeHierarchyResolver.setImportsResolver(importsResolver); 213 typeHierarchyResolver.setNamespaceFactory(namespaceFactory); 214 typeHierarchyResolver.setScriptHeaderResolver(scriptHeaderResolver); 215 typeHierarchyResolver.setTrace(bindingTrace); 216 217 scriptBodyResolver.setContext(topDownAnalysisContext); 218 scriptBodyResolver.setExpressionTypingServices(expressionTypingServices); 219 scriptBodyResolver.setTrace(bindingTrace); 220 221 } 222 223 @PreDestroy 224 public void destroy() { 225 } 226 227 public TopDownAnalyzer getTopDownAnalyzer() { 228 return this.topDownAnalyzer; 229 } 230 231 public TopDownAnalysisContext getTopDownAnalysisContext() { 232 return this.topDownAnalysisContext; 233 } 234 235 public BodyResolver getBodyResolver() { 236 return this.bodyResolver; 237 } 238 239 public ControlFlowAnalyzer getControlFlowAnalyzer() { 240 return this.controlFlowAnalyzer; 241 } 242 243 public DeclarationsChecker getDeclarationsChecker() { 244 return this.declarationsChecker; 245 } 246 247 public DescriptorResolver getDescriptorResolver() { 248 return this.descriptorResolver; 249 } 250 251 public Project getProject() { 252 return this.project; 253 } 254 255 public TopDownAnalysisParameters getTopDownAnalysisParameters() { 256 return this.topDownAnalysisParameters; 257 } 258 259 public BindingTrace getBindingTrace() { 260 return this.bindingTrace; 261 } 262 263 public ModuleDescriptorImpl getModuleDescriptor() { 264 return this.moduleDescriptor; 265 } 266 267}