diff --git a/src/java.compiler/share/classes/javax/lang/model/util/Elements.java b/src/java.compiler/share/classes/javax/lang/model/util/Elements.java index 72c5802a5c8..a4c4be0dcb0 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/Elements.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/Elements.java @@ -254,6 +254,11 @@ public interface Elements { * @implSpec The default implementation of this method returns * an empty set. * + * @apiNote + * When an environment includes modules, both named modules and + * {@linkplain ModuleElement#isUnnamed() unnamed modules} may be + * returned. + * * @return the known module elements, or an empty set if there are no modules * @see #getModuleElement(CharSequence) * @since 9