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.psi;
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.resolve.scopes.receivers.Receiver;
024    import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue;
025    
026    import java.util.List;
027    
028    public interface Call {
029    
030        // SAFE_ACCESS or DOT or so
031        @Nullable
032        ASTNode getCallOperationNode();
033    
034        @Nullable
035        Receiver getExplicitReceiver();
036    
037        @Nullable
038        ReceiverValue getDispatchReceiver();
039    
040        @Nullable
041        KtExpression getCalleeExpression();
042    
043        @Nullable
044        KtValueArgumentList getValueArgumentList();
045    
046        @ReadOnly
047        @NotNull
048        List<? extends ValueArgument> getValueArguments();
049    
050        @ReadOnly
051        @NotNull
052        List<? extends LambdaArgument> getFunctionLiteralArguments();
053    
054        @ReadOnly
055        @NotNull
056        List<KtTypeProjection> getTypeArguments();
057    
058        @Nullable
059        KtTypeArgumentList getTypeArgumentList();
060    
061        @NotNull
062        KtElement getCallElement();
063    
064        enum CallType {
065            DEFAULT, ARRAY_GET_METHOD, ARRAY_SET_METHOD, INVOKE
066        }
067    
068        @NotNull
069        Call.CallType getCallType();
070    }