-
Notifications
You must be signed in to change notification settings - Fork 78
/
RecordComponentInfo.java
57 lines (48 loc) · 1.36 KB
/
RecordComponentInfo.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
package jakarta.enterprise.lang.model.declarations;
import jakarta.enterprise.lang.model.types.Type;
/**
* A record component, {@linkplain #declaringRecord() declared} in some record.
*
* @since 4.0
*/
public interface RecordComponentInfo extends DeclarationInfo {
/**
* Returns the name of this record component.
*
* @return the name of this record component, never {@code null}
*/
String name();
/**
* Returns the {@linkplain Type type} of this record component.
*
* @return the {@linkplain Type type} of this record component, never {@code null}
*/
Type type();
/**
* Returns the field corresponding to this record component.
*
* @return the field, never {@code null}
*/
FieldInfo field();
/**
* Returns the accessor method corresponding to this record component.
*
* @return the accessor method, never {@code null}
*/
MethodInfo accessor();
/**
* Returns the {@linkplain ClassInfo record} that declares this component.
*
* @return the {@linkplain ClassInfo record} that declares this component, never {@code null}
*/
ClassInfo declaringRecord();
// ---
@Override
default Kind kind() {
return Kind.RECORD_COMPONENT;
}
@Override
default RecordComponentInfo asRecordComponent() {
return this;
}
}