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