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