-
Notifications
You must be signed in to change notification settings - Fork 78
/
ParameterInfo.java
46 lines (39 loc) · 1.27 KB
/
ParameterInfo.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
package jakarta.enterprise.lang.model.declarations;
import jakarta.enterprise.lang.model.types.Type;
/**
* A method parameter or a constructor parameter, {@linkplain #declaringMethod() declared} in some method
* or constructor.
*
* @since 4.0
*/
public interface ParameterInfo extends DeclarationInfo {
/**
* Returns the name of this parameter, if it is known. Method parameter names may not always be known,
* in which case a synthetic name of the form {@code argN}, where {@code N} is zero-based parameter position
* in the method declaration, is returned.
*
* @return the name of this parameter, or a synthetic name, never {@code null}
*/
String name();
/**
* Returns the {@linkplain Type type} of this parameter.
*
* @return the {@linkplain Type type} of this parameter, never {@code null}
*/
Type type();
/**
* Returns the {@linkplain MethodInfo method} that declares this parameter.
*
* @return the {@linkplain MethodInfo method} that declares this parameter, never {@code null}
*/
MethodInfo declaringMethod();
// ---
@Override
default Kind kind() {
return Kind.PARAMETER;
}
@Override
default ParameterInfo asParameter() {
return this;
}
}