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