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
017package org.jetbrains.jet.lang.resolve.calls.util;
018
019import com.intellij.lang.ASTNode;
020import com.intellij.psi.PsiElement;
021import org.jetbrains.annotations.NotNull;
022import org.jetbrains.annotations.Nullable;
023import org.jetbrains.jet.lang.psi.*;
024import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue;
025
026import java.util.List;
027
028public 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 getThisObject() {
051        return delegate.getThisObject();
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    public List<? extends ValueArgument> getValueArguments() {
069        return delegate.getValueArguments();
070    }
071
072    @Override
073    @NotNull
074    public List<JetExpression> getFunctionLiteralArguments() {
075        return delegate.getFunctionLiteralArguments();
076    }
077
078    @Override
079    @NotNull
080    public List<JetTypeProjection> getTypeArguments() {
081        return delegate.getTypeArguments();
082    }
083
084    @Override
085    @Nullable
086    public JetTypeArgumentList getTypeArgumentList() {
087        return delegate.getTypeArgumentList();
088    }
089
090    @NotNull
091    @Override
092    public PsiElement getCallElement() {
093        return delegate.getCallElement();
094    }
095
096    @NotNull
097    @Override
098    public CallType getCallType() {
099        return delegate.getCallType();
100    }
101}