Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ public interface ClassInfo extends DeclarationInfo {
*/
List<ClassInfo> superInterfacesDeclarations();

/**
* Returns a collection of permitted subclasses of this {@linkplain #isSealed() sealed} class.
* If this class is not sealed, returns an empty collection.
*
* @return immutable collection of permitted subclasses, never {@code null}
* @since 5.0
*/
Collection<ClassInfo> permittedSubclasses();

/**
* Returns whether this class is a plain class. That is, not an interface,
* not an enum, not an annotation, and not a record.
Expand Down Expand Up @@ -150,7 +159,7 @@ public interface ClassInfo extends DeclarationInfo {
* An interface or an annotation is always abstract.
* A record is never abstract.
*
* @return whether this class is {@code abstract}
* @return whether this class is abstract
*/
boolean isAbstract();

Expand All @@ -161,6 +170,14 @@ public interface ClassInfo extends DeclarationInfo {
*/
boolean isFinal();

/**
* Returns whether this class is {@code sealed}.
*
* @return whether this class is {@code sealed}
* @since 5.0
*/
boolean isSealed();

/**
* Returns the modifiers of this class as an {@code int}.
* Use {@link java.lang.reflect.Modifier Modifier} to inspect the value.
Expand Down