ForeignDataNode is a common trait of AnyxmlNode and AnydataNode, make
sure javac enforces that invariant.
Change-Id: Ie594e9b942bdb4744df20ac66dcf8d6f058c89c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* @param <V> Value type, uniquely identifying the object model used for values
*/
@Beta
-public interface AnydataNode<V> extends ForeignDataNode<V> {
+public non-sealed interface AnydataNode<V> extends ForeignDataNode<V> {
@Override
@SuppressWarnings("rawtypes")
default Class<AnydataNode> contract() {
* @param <V> Value type, uniquely identifying the object model used for values
*/
@Beta
-public interface AnyxmlNode<V> extends ForeignDataNode<V> {
+public non-sealed interface AnyxmlNode<V> extends ForeignDataNode<V> {
@Override
@SuppressWarnings("rawtypes")
default Class<AnyxmlNode> contract() {
* @param <V> Value type, uniquely identifying the object model used for values
*/
@Beta
-public interface ForeignDataNode<V> extends DataContainerChild {
+public sealed interface ForeignDataNode<V> extends DataContainerChild permits AnydataNode, AnyxmlNode {
/**
* {@inheritDoc}
*