2323import io .github .ascopes .jct .filemanagers .PathFileObject ;
2424import io .github .ascopes .jct .utils .UtilityClass ;
2525import java .util .List ;
26+ import javax .annotation .CheckReturnValue ;
2627import javax .annotation .Nullable ;
2728import javax .annotation .concurrent .Immutable ;
2829import javax .annotation .concurrent .ThreadSafe ;
@@ -57,6 +58,7 @@ private JctAssertions() {
5758 * @param compilation the compilation to assert on.
5859 * @return the assertion.
5960 */
61+ @ CheckReturnValue
6062 public static JctCompilationAssert assertThat (@ Nullable JctCompilation compilation ) {
6163 return assertThatCompilation (compilation );
6264 }
@@ -71,6 +73,7 @@ public static JctCompilationAssert assertThat(@Nullable JctCompilation compilati
7173 * @param moduleContainerGroup the module container group to assert on.
7274 * @return the assertion.
7375 */
76+ @ CheckReturnValue
7477 public static ModuleContainerGroupAssert assertThat (
7578 @ Nullable ModuleContainerGroup moduleContainerGroup
7679 ) {
@@ -87,6 +90,7 @@ public static ModuleContainerGroupAssert assertThat(
8790 * @param outputContainerGroup the output container group to assert on.
8891 * @return the assertion.
8992 */
93+ @ CheckReturnValue
9094 public static OutputContainerGroupAssert assertThat (
9195 @ Nullable OutputContainerGroup outputContainerGroup
9296 ) {
@@ -103,6 +107,7 @@ public static OutputContainerGroupAssert assertThat(
103107 * @param packageContainerGroup the package container group to assert on.
104108 * @return the assertion.
105109 */
110+ @ CheckReturnValue
106111 public static PackageContainerGroupAssert assertThat (
107112 @ Nullable PackageContainerGroup packageContainerGroup
108113 ) {
@@ -119,6 +124,7 @@ public static PackageContainerGroupAssert assertThat(
119124 * @param diagnostic the diagnostic to assert on.
120125 * @return the assertion.
121126 */
127+ @ CheckReturnValue
122128 public static TraceDiagnosticAssert assertThat (
123129 @ Nullable TraceDiagnostic <? extends JavaFileObject > diagnostic
124130 ) {
@@ -135,6 +141,7 @@ public static TraceDiagnosticAssert assertThat(
135141 * @param fileObject the file object to assert on.
136142 * @return the assertion.
137143 */
144+ @ CheckReturnValue
138145 public static JavaFileObjectAssert assertThat (@ Nullable JavaFileObject fileObject ) {
139146 return assertThatFileObject (fileObject );
140147 }
@@ -149,6 +156,7 @@ public static JavaFileObjectAssert assertThat(@Nullable JavaFileObject fileObjec
149156 * @param fileObject the file object to assert on.
150157 * @return the assertion.
151158 */
159+ @ CheckReturnValue
152160 public static PathFileObjectAssert assertThat (@ Nullable PathFileObject fileObject ) {
153161 return assertThatFileObject (fileObject );
154162 }
@@ -163,6 +171,7 @@ public static PathFileObjectAssert assertThat(@Nullable PathFileObject fileObjec
163171 * @param kind the diagnostic kind to assert on.
164172 * @return the assertion.
165173 */
174+ @ CheckReturnValue
166175 public static DiagnosticKindAssert assertThat (@ Nullable Diagnostic .Kind kind ) {
167176 return assertThatKind (kind );
168177 }
@@ -177,6 +186,7 @@ public static DiagnosticKindAssert assertThat(@Nullable Diagnostic.Kind kind) {
177186 * @param kind the Java file object kind to assert on.
178187 * @return the assertion.
179188 */
189+ @ CheckReturnValue
180190 public static JavaFileObjectKindAssert assertThat (@ Nullable JavaFileObject .Kind kind ) {
181191 return assertThatKind (kind );
182192 }
@@ -191,6 +201,7 @@ public static JavaFileObjectKindAssert assertThat(@Nullable JavaFileObject.Kind
191201 * @param location the location to assert on.
192202 * @return the assertion.
193203 */
204+ @ CheckReturnValue
194205 public static LocationAssert assertThat (@ Nullable Location location ) {
195206 return assertThatLocation (location );
196207 }
@@ -201,6 +212,7 @@ public static LocationAssert assertThat(@Nullable Location location) {
201212 * @param compilation the compilation to assert on.
202213 * @return the assertion.
203214 */
215+ @ CheckReturnValue
204216 public static JctCompilationAssert assertThatCompilation (@ Nullable JctCompilation compilation ) {
205217 return new JctCompilationAssert (compilation );
206218 }
@@ -211,6 +223,7 @@ public static JctCompilationAssert assertThatCompilation(@Nullable JctCompilatio
211223 * @param moduleContainerGroup the module container group to assert on.
212224 * @return the assertion.
213225 */
226+ @ CheckReturnValue
214227 public static ModuleContainerGroupAssert assertThatContainerGroup (
215228 @ Nullable ModuleContainerGroup moduleContainerGroup
216229 ) {
@@ -223,6 +236,7 @@ public static ModuleContainerGroupAssert assertThatContainerGroup(
223236 * @param outputContainerGroup the output container group to assert on.
224237 * @return the assertion.
225238 */
239+ @ CheckReturnValue
226240 public static OutputContainerGroupAssert assertThatContainerGroup (
227241 @ Nullable OutputContainerGroup outputContainerGroup
228242 ) {
@@ -235,6 +249,7 @@ public static OutputContainerGroupAssert assertThatContainerGroup(
235249 * @param packageContainerGroup the package container group to assert on.
236250 * @return the assertion.
237251 */
252+ @ CheckReturnValue
238253 public static PackageContainerGroupAssert assertThatContainerGroup (
239254 @ Nullable PackageContainerGroup packageContainerGroup
240255 ) {
@@ -247,6 +262,7 @@ public static PackageContainerGroupAssert assertThatContainerGroup(
247262 * @param diagnostic the diagnostic to assert on.
248263 * @return the assertion.
249264 */
265+ @ CheckReturnValue
250266 public static TraceDiagnosticAssert assertThatDiagnostic (
251267 @ Nullable TraceDiagnostic <? extends JavaFileObject > diagnostic
252268 ) {
@@ -259,6 +275,7 @@ public static TraceDiagnosticAssert assertThatDiagnostic(
259275 * @param diagnostics the diagnostics to assert on.
260276 * @return the assertion.
261277 */
278+ @ CheckReturnValue
262279 public static TraceDiagnosticListAssert assertThatDiagnostics (
263280 @ Nullable List <? extends TraceDiagnostic <? extends JavaFileObject >> diagnostics
264281 ) {
@@ -271,6 +288,7 @@ public static TraceDiagnosticListAssert assertThatDiagnostics(
271288 * @param fileObject the file object to assert on.
272289 * @return the assertion.
273290 */
291+ @ CheckReturnValue
274292 public static JavaFileObjectAssert assertThatFileObject (@ Nullable JavaFileObject fileObject ) {
275293 return new JavaFileObjectAssert (fileObject );
276294 }
@@ -281,6 +299,7 @@ public static JavaFileObjectAssert assertThatFileObject(@Nullable JavaFileObject
281299 * @param fileObject the file object to assert on.
282300 * @return the assertion.
283301 */
302+ @ CheckReturnValue
284303 public static PathFileObjectAssert assertThatFileObject (@ Nullable PathFileObject fileObject ) {
285304 return new PathFileObjectAssert (fileObject );
286305 }
@@ -291,6 +310,7 @@ public static PathFileObjectAssert assertThatFileObject(@Nullable PathFileObject
291310 * @param kind the diagnostic kind to assert on.
292311 * @return the assertion.
293312 */
313+ @ CheckReturnValue
294314 public static DiagnosticKindAssert assertThatKind (@ Nullable Diagnostic .Kind kind ) {
295315 return new DiagnosticKindAssert (kind );
296316 }
@@ -301,6 +321,7 @@ public static DiagnosticKindAssert assertThatKind(@Nullable Diagnostic.Kind kind
301321 * @param kind the Java file object kind to assert on.
302322 * @return the assertion.
303323 */
324+ @ CheckReturnValue
304325 public static JavaFileObjectKindAssert assertThatKind (@ Nullable JavaFileObject .Kind kind ) {
305326 return new JavaFileObjectKindAssert (kind );
306327 }
@@ -311,6 +332,7 @@ public static JavaFileObjectKindAssert assertThatKind(@Nullable JavaFileObject.K
311332 * @param location the location to assert on.
312333 * @return the assertion.
313334 */
335+ @ CheckReturnValue
314336 public static LocationAssert assertThatLocation (@ Nullable Location location ) {
315337 return new LocationAssert (location );
316338 }
0 commit comments