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.lang.resolve.calls.util;
018    
019    import com.intellij.lang.ASTNode;
020    import org.jetbrains.annotations.NotNull;
021    import org.jetbrains.annotations.Nullable;
022    import org.jetbrains.jet.lang.psi.*;
023    import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue;
024    
025    import java.util.List;
026    
027    public class DelegatingCall implements Call {
028    
029        private final Call delegate;
030    
031        public DelegatingCall(@NotNull Call delegate) {
032            this.delegate = delegate;
033        }
034    
035        @Override
036        @Nullable
037        public ASTNode getCallOperationNode() {
038            return delegate.getCallOperationNode();
039        }
040    
041        @Override
042        @NotNull
043        public ReceiverValue getExplicitReceiver() {
044            return delegate.getExplicitReceiver();
045        }
046    
047        @NotNull
048        @Override
049        public ReceiverValue getThisObject() {
050            return delegate.getThisObject();
051        }
052    
053        @Override
054        @Nullable
055        public JetExpression getCalleeExpression() {
056            return delegate.getCalleeExpression();
057        }
058    
059        @Override
060        @Nullable
061        public JetValueArgumentList getValueArgumentList() {
062            return delegate.getValueArgumentList();
063        }
064    
065        @Override
066        @NotNull
067        public List<? extends ValueArgument> getValueArguments() {
068            return delegate.getValueArguments();
069        }
070    
071        @Override
072        @NotNull
073        public List<JetExpression> getFunctionLiteralArguments() {
074            return delegate.getFunctionLiteralArguments();
075        }
076    
077        @Override
078        @NotNull
079        public List<JetTypeProjection> getTypeArguments() {
080            return delegate.getTypeArguments();
081        }
082    
083        @Override
084        @Nullable
085        public JetTypeArgumentList getTypeArgumentList() {
086            return delegate.getTypeArgumentList();
087        }
088    
089        @NotNull
090        @Override
091        public JetElement getCallElement() {
092            return delegate.getCallElement();
093        }
094    
095        @NotNull
096        @Override
097        public CallType getCallType() {
098            return delegate.getCallType();
099        }
100    }