mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 18:03:44 +00:00
8246280: Refine API to model sealed classes and interfaces in javax.lang.model
Reviewed-by: vromero, jjg
This commit is contained in:
parent
dcea9bf087
commit
5308bbbcf8
@ -255,6 +255,8 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable
|
||||
/**
|
||||
* Returns the permitted classes of this class or interface
|
||||
* element in declaration order.
|
||||
* Note that for an interface, permitted subclasses and
|
||||
* subinterfaces can be returned.
|
||||
*
|
||||
* @implSpec The default implementations of this method returns an
|
||||
* empty and unmodifiable list.
|
||||
@ -262,6 +264,8 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable
|
||||
* @return the permitted classes, or an empty list if there are none
|
||||
*
|
||||
* @since 17
|
||||
* @jls 8.1.6 Permitted Direct Subclasses
|
||||
* @jls 9.1.4 Permitted Direct Subclasses and Subinterfaces
|
||||
*/
|
||||
default List<? extends TypeMirror> getPermittedSubclasses() {
|
||||
return List.of();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user