You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Mark a method as an accessor regardless of its name. This annotation will be ignored if {@link #includes()} does not include {@link ComponentType#ACCESSORS}.
92
+
* Mark a method as an accessor regardless of its name.
93
+
* Getter prefixes are configured in global properties.
94
+
* This annotation will be ignored if {@link #includes()} does not include {@link ComponentType#ACCESSORS}.
60
95
*/
61
96
@Target({ElementType.METHOD})
62
97
@Retention(RetentionPolicy.SOURCE)
63
98
@interface Accessor {
64
99
}
65
100
66
101
/**
67
-
* Exclude fields, record components, accessors in a type. Or ignore a dependent type, e.g. a supertype.
102
+
* Exclude fields, record components, accessors in a type, or a dependency type, e.g. a supertype.
68
103
* <p>
69
-
* <b>When placed on type:</b> a subtype of this type will not include inherited members from this type.
70
-
* But if this type is referenced directly as type of a field or return type of an accessor, an error will be reported,
104
+
* <b>When placed on a type:</b> a subtype of this type will not extend this type in target code.
105
+
* But if this type is referenced directly as type of a field or return type of an accessor, a compilation error will be reported,
71
106
* unless the field or accessor is also ignored.
72
107
* </p>
73
108
*/
@@ -78,15 +113,13 @@
78
113
79
114
/**
80
115
* Mark enum value. By default, enum value is the enum constant name. The enum value must be literals (e.g. 1, "a", true) in enum constant expressions.
81
-
* <br>
82
116
* <p>
83
117
* When placed on:
84
118
* <ul>
85
119
* <li>Constructor parameter - the literal value served to this parameter from enum constant expressions will be used.</li>
86
120
* <li>Field - the constructor parameter with the same name and type will be used as if constructor parameter is annotated.</li>
87
121
* </ul>
88
122
* </p>
89
-
* <br>
90
123
* <p>
91
124
* Below are some valid examples:
92
125
* </p>
@@ -134,10 +167,10 @@ enum ComponentType {
134
167
*/
135
168
FIELDS,
136
169
/**
137
-
* Represents 0 argument non-static methods:
170
+
* Represents 0 argument non-static methods that:
138
171
* <ul>
139
-
* <li>with name same as its instance field. Or fluent getter. This includes record's component accessor.</li>
140
-
* <li>starting with a getter prefix. By default, prefixes include 'get' or 'is', which can be configured via global properties.</li>
172
+
* <li>have names same as respective instance fields, aka, fluent getter. This includes record's component accessor.</li>
173
+
* <li>start with a getter prefix. By default, prefixes include 'get' or 'is', which can be configured via global properties.</li>
141
174
* <li>annotated with {@link Accessor}.</li>
142
175
* </ul>
143
176
*/
@@ -148,6 +181,8 @@ enum ComponentType {
148
181
* <li>Class/record static fields with static values.</li>
149
182
* </ul>
150
183
* Fields with values that cannot be resolved at compile time will not be included. A corresponding warning will be given.
Copy file name to clipboardExpand all lines: doc/Development.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -62,3 +62,4 @@ Then attach your debugger on it.
62
62
1. since annotation processing is one shot execution, JIT is not likely to optimize the code. So prefer plain loop than long calling stacks like Stream chains.
63
63
2. no adding dependencies without strong justification.
64
64
3. Lombok is used in this project, but do not abuse. Only use it to replace unavoidable boilerplate code, and not to increase the bytecode size.
65
+
Do not use compile time heavy annotation like `lombok.val`.
0 commit comments