Skip to content

Commit 5308bbb

Browse files
committed
8246280: Refine API to model sealed classes and interfaces in javax.lang.model
Reviewed-by: vromero, jjg
1 parent dcea9bf commit 5308bbb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,17 @@ default List<? extends RecordComponentElement> getRecordComponents() {
255255
/**
256256
* Returns the permitted classes of this class or interface
257257
* element in declaration order.
258+
* Note that for an interface, permitted subclasses and
259+
* subinterfaces can be returned.
258260
*
259261
* @implSpec The default implementations of this method returns an
260262
* empty and unmodifiable list.
261263
*
262264
* @return the permitted classes, or an empty list if there are none
263265
*
264266
* @since 17
267+
* @jls 8.1.6 Permitted Direct Subclasses
268+
* @jls 9.1.4 Permitted Direct Subclasses and Subinterfaces
265269
*/
266270
default List<? extends TypeMirror> getPermittedSubclasses() {
267271
return List.of();

0 commit comments

Comments
 (0)