From 69f3114c4119d66a8c16cf95c35ea1adc488bdee Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 23 Jun 2023 21:21:41 +0000 Subject: [PATCH] 8310676: add note about unnamed module to Elements.getAllModuleElements Reviewed-by: jjg --- .../share/classes/javax/lang/model/util/Elements.java | 5 +++++ 1 file changed, 5 insertions(+) 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