BaseNotification should never be used directly, only through
Notification and InstanceNotification.
Change-Id: Ib3fd70aeb364523d7f630eb6e882f2308e427884
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* only to tie together semantics of global notifications (as represented by {@link Notification}) and instance
* notifications (as represented by {@link InstanceNotification}.
*/
-public interface BaseNotification extends DataContainer {
+public sealed interface BaseNotification extends DataContainer permits Notification, InstanceNotification {
}
* @param <T> Parent data tree instance type
*/
@Beta
-public interface InstanceNotification<N extends InstanceNotification<N, T>, T extends DataObject>
+public non-sealed interface InstanceNotification<N extends InstanceNotification<N, T>, T extends DataObject>
extends BaseNotification {
-
@Override
@NonNull Class<N> implementedInterface();
}
* interface. In case they do, {@link EventInstantAware#eventInstant()} returns the time when this notification was
* generated.
*/
-public interface Notification<T extends Notification<T> & DataObject> extends BaseNotification {
+public non-sealed interface Notification<T extends Notification<T> & DataObject> extends BaseNotification {
@Override
Class<T> implementedInterface();
}