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