*/
@Beta
public interface MountPointNode extends DataContainerNode, DataContainerChild, MixinNode {
+ @Override
+ default Class<MountPointNode> contract() {
+ return MountPointNode.class;
+ }
+
@Override
MountPointIdentifier getIdentifier();
*/
@Beta
public interface AnydataNode<V> extends ForeignDataNode<V> {
+ @Override
+ @SuppressWarnings("rawtypes")
+ default Class<AnydataNode> contract() {
+ return AnydataNode.class;
+ }
+
@Override
NodeIdentifier getIdentifier();
}
*/
@Beta
public interface AnyxmlNode<V> extends ForeignDataNode<V> {
+ @Override
+ @SuppressWarnings("rawtypes")
+ default Class<AnyxmlNode> contract() {
+ return AnyxmlNode.class;
+ }
+
@Override
NodeIdentifier getIdentifier();
}
* Augmentation node MUST NOT be direct child of other augmentation node.
*/
public interface AugmentationNode extends DataContainerNode, DataContainerChild, MixinNode {
+ @Override
+ default Class<AugmentationNode> contract() {
+ return AugmentationNode.class;
+ }
+
/**
* Gets identifier of augmentation node. Returned identifier of augmentation node contains all possible
* direct child QNames.
* {@link org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode#getCases()}.
*/
public interface ChoiceNode extends MixinNode, DataContainerNode, DataContainerChild {
+ @Override
+ default Class<ChoiceNode> contract() {
+ return ChoiceNode.class;
+ }
+
@Override
NodeIdentifier getIdentifier();
}
* {@link org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode}.
*/
public interface ContainerNode extends DataContainerNode, DataContainerChild {
+ @Override
+ default Class<ContainerNode> contract() {
+ return ContainerNode.class;
+ }
+
@Override
NodeIdentifier getIdentifier();
}
* @param <T> Value type
*/
public interface LeafNode<T> extends ValueNode<T>, DataContainerChild {
+ @Override
+ @SuppressWarnings("rawtypes")
+ default Class<LeafNode> contract() {
+ return LeafNode.class;
+ }
+
@Override
NodeIdentifier getIdentifier();
}
* @param <T> Value type
*/
public interface LeafSetEntryNode<T> extends ValueNode<T> {
+ @Override
+ @SuppressWarnings("rawtypes")
+ default Class<LeafSetEntryNode> contract() {
+ return LeafSetEntryNode.class;
+ }
+
/**
* {@inheritDoc}
*
*/
public interface LeafSetNode<T>
extends DistinctNodeContainer<NodeWithValue<?>, LeafSetEntryNode<T>>, DataContainerChild, MixinNode {
+ @Override
+ @SuppressWarnings("rawtypes")
+ Class<? extends LeafSetNode> contract();
+
@Override
NodeIdentifier getIdentifier();
}
* Instance of Map entry, this node does not contains value, but child nodes.
*/
public interface MapEntryNode extends DataContainerNode {
+ @Override
+ default Class<MapEntryNode> contract() {
+ return MapEntryNode.class;
+ }
+
/**
* Returns identifier of this node in parent map node
*
*/
public interface MapNode
extends DistinctNodeContainer<NodeIdentifierWithPredicates, MapEntryNode>, DataContainerChild, MixinNode {
+ @Override
+ Class<? extends MapNode> contract();
+
@Override
NodeIdentifier getIdentifier();
// We override here, so that NormalizedNode.getIdentifier() has fewer implementations
PathArgument getIdentifier();
+ /**
+ * Return the contract governing this {@link NormalizedNode} instance.
+ *
+ * @apiNote
+ * This method should be specialized in intermediate contracts like {@link MapNode} and implemented as a default
+ * method by interfaces which form the contracts themselves, for example {@link ContainerNode}, {@link LeafNode}
+ * and similar.
+ *
+ * @return A class identifying the NormalizedNode contract.
+ */
+ @NonNull Class<? extends NormalizedNode> contract();
+
/**
* Returns the body of this node. While the return value specifies {@link Object}, this method's return value has
* further semantics. The returned object must be a well-published contract, such as {@code String},
* @param <T> Type of leaf node values.
*/
public interface SystemLeafSetNode<T> extends LeafSetNode<T>, OrderingAware.System {
+ @Override
+ @SuppressWarnings("rawtypes")
+ default Class<SystemLeafSetNode> contract() {
+ return SystemLeafSetNode.class;
+ }
+
@Override
int hashCode();
* a {@code list} with {@code ordered-by user;} substatement and a {@code key} definition.
*/
public interface SystemMapNode extends MapNode, OrderingAware.System {
+ @Override
+ default Class<SystemMapNode> contract() {
+ return SystemMapNode.class;
+ }
+
@Override
int hashCode();
* which is an instance of {@link UnkeyedListNode}.
*/
public interface UnkeyedListEntryNode extends DataContainerNode {
+ @Override
+ default Class<UnkeyedListEntryNode> contract() {
+ return UnkeyedListEntryNode.class;
+ }
+
@Override
NodeIdentifier getIdentifier();
}
* (iteration) is provided by {@link #body()} call.
*/
public interface UnkeyedListNode extends OrderedNodeContainer<UnkeyedListEntryNode>, DataContainerChild {
-
+ @Override
+ default Class<UnkeyedListNode> contract() {
+ return UnkeyedListNode.class;
+ }
}
* @param <T> Value type of Leaf entries
*/
public interface UserLeafSetNode<T> extends LeafSetNode<T>, OrderedNodeContainer<LeafSetEntryNode<T>> {
-
+ @Override
+ @SuppressWarnings("rawtypes")
+ default Class<UserLeafSetNode> contract() {
+ return UserLeafSetNode.class;
+ }
}
* a {@code list} with {@code ordered-by user;} substatement and a {@code key} definition.
*/
public interface UserMapNode extends MapNode, OrderedNodeContainer<MapEntryNode> {
+ @Override
+ default Class<UserMapNode> contract() {
+ return UserMapNode.class;
+ }
+
/**
* {@inheritDoc}
*