001 /*
002 * Copyright 2010-2014 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.lang.types.expressions;
018
019 import org.jetbrains.annotations.NotNull;
020 import org.jetbrains.jet.context.GlobalContext;
021 import org.jetbrains.jet.lang.PlatformToKotlinClassMap;
022 import org.jetbrains.jet.lang.reflect.ReflectionTypes;
023 import org.jetbrains.jet.lang.resolve.calls.CallResolver;
024
025 import javax.inject.Inject;
026
027 public class ExpressionTypingComponents {
028 /*package*/ GlobalContext globalContext;
029 /*package*/ ExpressionTypingServices expressionTypingServices;
030 /*package*/ CallResolver callResolver;
031 /*package*/ PlatformToKotlinClassMap platformToKotlinClassMap;
032 /*package*/ ExpressionTypingUtils expressionTypingUtils;
033 /*package*/ ControlStructureTypingUtils controlStructureTypingUtils;
034 /*package*/ ForLoopConventionsChecker forLoopConventionsChecker;
035 /*package*/ ReflectionTypes reflectionTypes;
036
037 @Inject
038 public void setGlobalContext(@NotNull GlobalContext globalContext) {
039 this.globalContext = globalContext;
040 }
041
042 @Inject
043 public void setExpressionTypingServices(@NotNull ExpressionTypingServices expressionTypingServices) {
044 this.expressionTypingServices = expressionTypingServices;
045 }
046
047 @Inject
048 public void setCallResolver(@NotNull CallResolver callResolver) {
049 this.callResolver = callResolver;
050 }
051
052 @Inject
053 public void setPlatformToKotlinClassMap(@NotNull PlatformToKotlinClassMap platformToKotlinClassMap) {
054 this.platformToKotlinClassMap = platformToKotlinClassMap;
055 }
056
057 @Inject
058 public void setExpressionTypingUtils(@NotNull ExpressionTypingUtils expressionTypingUtils) {
059 this.expressionTypingUtils = expressionTypingUtils;
060 }
061
062 @Inject
063 public void setControlStructureTypingUtils(@NotNull ControlStructureTypingUtils controlStructureTypingUtils) {
064 this.controlStructureTypingUtils = controlStructureTypingUtils;
065 }
066
067 @Inject
068 public void setForLoopConventionsChecker(@NotNull ForLoopConventionsChecker forLoopConventionsChecker) {
069 this.forLoopConventionsChecker = forLoopConventionsChecker;
070 }
071
072 @Inject
073 public void setReflectionTypes(@NotNull ReflectionTypes reflectionTypes) {
074 this.reflectionTypes = reflectionTypes;
075 }
076
077 @NotNull
078 public ForLoopConventionsChecker getForLoopConventionsChecker() {
079 return forLoopConventionsChecker;
080 }
081 }