-
-
Notifications
You must be signed in to change notification settings - Fork 354
/
Copy pathCtInvocation.java
76 lines (68 loc) · 2.29 KB
/
CtInvocation.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* SPDX-License-Identifier: (MIT OR CECILL-C)
*
* Copyright (C) 2006-2023 INRIA and contributors
*
* Spoon is available either under the terms of the MIT License (see LICENSE-MIT.txt) or the Cecill-C License (see LICENSE-CECILL-C.txt). You as the user are entitled to choose the terms under which to adopt Spoon.
*/
package spoon.reflect.code;
import spoon.reflect.reference.CtActualTypeContainer;
import spoon.reflect.reference.CtExecutableReference;
import spoon.reflect.reference.CtTypeReference;
import spoon.support.DerivedProperty;
import spoon.reflect.annotations.PropertyGetter;
import spoon.reflect.annotations.PropertySetter;
import java.util.List;
import static spoon.reflect.path.CtRole.TYPE;
import static spoon.reflect.path.CtRole.TYPE_ARGUMENT;
/**
* This code element defines a concrete invocation.
*
* Example:
* <pre>
* // invocation of method println
* // the target is "System.out"
* System.out.println("foo");
* </pre>
*
* @param <T>
* Return type of this invocation
*/
public interface CtInvocation<T> extends CtAbstractInvocation<T>, CtStatement, CtTargetedExpression<T, CtExpression<?>>, CtActualTypeContainer {
/**
* Delegate to the executable reference of the invocation.
*
* @see CtExecutableReference#getActualTypeArguments()
*/
@Override
@DerivedProperty
@PropertyGetter(role = TYPE_ARGUMENT)
List<CtTypeReference<?>> getActualTypeArguments();
/**
* Delegate to the executable reference of the invocation.
*
* @see CtExecutableReference#getActualTypeArguments()
*/
@Override
@PropertySetter(role = TYPE_ARGUMENT)
<T extends CtActualTypeContainer> T setActualTypeArguments(List<? extends CtTypeReference<?>> actualTypeArguments);
/**
* Delegate to the executable reference of the invocation.
*
* @see CtExecutableReference#getActualTypeArguments()
*/
@Override
@PropertySetter(role = TYPE_ARGUMENT)
<T extends CtActualTypeContainer> T addActualTypeArgument(CtTypeReference<?> actualTypeArgument);
/**
* Return the type returned by the invocation. If the invocation is to a
* method where the returned type is a generic type, this method returns
* the actual type bound to this particular invocation.
*/
@Override
@DerivedProperty
@PropertyGetter(role = TYPE)
CtTypeReference<T> getType();
@Override
CtInvocation<T> clone();
}