-
CSR
-
Resolution: Approved
-
P3
-
None
-
source
-
minimal
-
Typical use of default methods to add a method to an interface.
-
Java API
-
SE
Summary
Add a convenience predicate to javax.lang.model.util.Elements
to test for automatic modules.
Problem
No API in javax.lang.model
to determine of a module is automatic or not.
Solution
Add a method providing the functionality in question.
Specification
New method added to javax.lang.model.util.Elements
:
/**
* {@return {@code true} if the module element is an automatic
* module, {@code false} otherwise}
*
* @implSpec
* The default implementation of this method returns {@code
* false}.
*
* @param module the module element being examined
* @jls 7.7.1 Dependences
* @since 17
*/
default boolean isAutomaticModule(ModuleElement module)
- blocks
-
JDK-8264866 Remove unneeded WorkArounds.isAutomaticModule
- Resolved
- csr of
-
JDK-8261625 Add `Elements.isAutomaticModule(ModuleElement)`
- Resolved
- duplicates
-
JDK-8216501 javax.lang.model should provide utility predicates for ModuleElements
- Closed
-
JDK-8181201 Retrieve FileObject from Element feature request
- Closed
- relates to
-
JDK-8216501 javax.lang.model should provide utility predicates for ModuleElements
- Closed