11/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
22 *
3- * Copyright © 2024–2025 microBean™.
3+ * Copyright © 2024–2026 microBean™.
44 *
55 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66 * the License. You may obtain a copy of the License at
5555import static java .lang .constant .ConstantDescs .BSM_INVOKE ;
5656
5757/**
58- * A {@linkplain Domain domain of Java constructs} that can be used at annotation processing time or at runtime.
58+ * A {@linkplain Domain domain of valid Java constructs} that can be used at annotation processing time or at runtime.
5959 *
6060 * @author <a href="https://about.me/lairdnelson" target="_top">Laird Nelson</a>
6161 *
@@ -83,13 +83,15 @@ public DefaultDomain() {
8383 * Creates a new {@link DefaultDomain} <strong>normally for use at annotation processing time</strong>, whose usage
8484 * type is actually determined by the argument supplied to this constructor.
8585 *
86- * @param pe a {@link ProcessingEnvironment}; may be {@code null} in which case the return value of an invocation of
87- * {@link Supplier#get()} on the return value of an invocation of {@link RuntimeProcessingEnvironmentSupplier#of ()}
88- * will be used instead
86+ * @param pe a {@link ProcessingEnvironment}; may be {@code null} (<strong> the expected value for runtime
87+ * usage</strong>), in which case the return value of an invocation of {@link Supplier#get ()} on the return value of
88+ * an invocation of {@link RuntimeProcessingEnvironmentSupplier#of()} will be used instead
8989 *
9090 * @see #DefaultDomain(ProcessingEnvironment, Lock)
9191 *
92- * @see SymbolCompletionLock
92+ * @see RuntimeProcessingEnvironmentSupplier#get()
93+ *
94+ * @see SymbolCompletionLock#INSTANCE
9395 */
9496 public DefaultDomain (final ProcessingEnvironment pe ) {
9597 this (pe , null );
@@ -103,9 +105,9 @@ public DefaultDomain(final ProcessingEnvironment pe) {
103105 *
104106 * @see #DefaultDomain(ProcessingEnvironment, Lock)
105107 *
106- * @see RuntimeProcessingEnvironmentSupplier
108+ * @see RuntimeProcessingEnvironmentSupplier#get()
107109 *
108- * @see SymbolCompletionLock
110+ * @see SymbolCompletionLock#INSTANCE
109111 */
110112 public DefaultDomain (final Lock lock ) {
111113 this (null , lock );
@@ -115,18 +117,18 @@ public DefaultDomain(final Lock lock) {
115117 * Creates a new {@link DefaultDomain} <strong>normally for use at annotation processing time</strong>, whose usage
116118 * type is actually determined by the arguments supplied to this constructor.
117119 *
118- * @param pe a {@link ProcessingEnvironment}; may be {@code null} in which case the return value of an invocation of
119- * {@link Supplier#get()} on the return value of an invocation of {@link RuntimeProcessingEnvironmentSupplier#of ()}
120- * will be used instead
120+ * @param pe a {@link ProcessingEnvironment}; may be {@code null} (<strong> the expected value for runtime
121+ * usage</strong>), in which case the return value of an invocation of {@link Supplier#get ()} on the return value of
122+ * an invocation of {@link RuntimeProcessingEnvironmentSupplier#of()} will be used instead
121123 *
122124 * @param lock a {@link Lock} to use to serialize symbol completion; if {@code null} and {@code pe} is {@code null},
123125 * then a global {@link ReentrantLock} will be used instead; if {@code null} and {@code pe} is non-{@code null}, then
124126 * no serialization of symbol completion will occur <strong>and this {@link DefaultDomain} therefore will not be safe
125127 * for concurrent use by multiple threads</strong>
126128 *
127- * @see RuntimeProcessingEnvironmentSupplier
129+ * @see RuntimeProcessingEnvironmentSupplier#get()
128130 *
129- * @see SymbolCompletionLock
131+ * @see SymbolCompletionLock#INSTANCE
130132 */
131133 public DefaultDomain (final ProcessingEnvironment pe , final Lock lock ) {
132134 super ();
@@ -159,7 +161,7 @@ public List<? extends UniversalElement> allMembers(TypeElement e) {
159161 return UniversalElement .of (this .elements ().getAllMembers (e ), this );
160162 }
161163 }
162-
164+
163165 /**
164166 * Returns a {@link UniversalType} representing an {@link javax.lang.model.type.ArrayType} whose {@linkplain
165167 * javax.lang.model.type.ArrayType#getComponentType() component type} {@linkplain #sameType(TypeMirror, TypeMirror) is
@@ -611,8 +613,10 @@ public UniversalType wildcardType(TypeMirror extendsBound, TypeMirror superBound
611613 */
612614
613615
616+ // (Invoked only by method reference.)
614617 private static final void doNothing () {}
615618
619+ // (Invoked only by method reference.)
616620 private static final Unlockable noopLock () {
617621 return DefaultDomain ::doNothing ;
618622 }
@@ -626,7 +630,7 @@ private static final <E extends Element> E unwrap(final E e) {
626630 }
627631
628632 private static final TypeMirror [] unwrap (final TypeMirror [] ts ) {
629- if (ts == null || ts .length < = 0 ) {
633+ if (ts == null || ts .length = = 0 ) {
630634 return ts ;
631635 }
632636 final TypeMirror [] rv = new TypeMirror [ts .length ];
0 commit comments