*/
package org.opendaylight.yangtools.rfc8040.model.api;
-import com.google.common.annotations.Beta;
import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yangtools.yang.model.api.ContainerLike;
import org.opendaylight.yangtools.yang.model.api.ContainerLikeCompat;
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
* <a href="https://www.rfc-editor.org/rfc/rfc8040#section-8">RFC8040</a>. This statement must appear as a top-level
* statement, otherwise it is ignored and does not appear in the final schema context.
*/
-@Beta
public interface YangDataSchemaNode extends UnknownSchemaNode, DataNodeContainer {
@Override
YangDataEffectiveStatement asEffectiveStatement();
+ /**
+ * Return a {@link ContainerLike} backed by this definition's {@link #getChildNodes()}.
+ *
+ * @return A compatibility {@link ContainerLike}
+ */
default @NonNull ContainerLikeCompat toContainerLike() {
return new YangDataAsContainer(this);
}
/**
* {@link StatementDefinition}s for statements defined by RFC8040.
- *
- * @author Robert Varga
*/
@NonNullByDefault
public enum YangDataStatements implements StatementDefinition {
final Class<? extends DeclaredStatement<?>> declaredRepresentation,
final Class<? extends EffectiveStatement<?, ?>> effectiveRepresentation) {
this.statementName = statementName.intern();
- this.argumentDef = ArgumentDefinition.of(QName.create(statementName, argumentName).intern(), false);
+ argumentDef = ArgumentDefinition.of(QName.create(statementName, argumentName).intern(), false);
this.declaredRepresentation = requireNonNull(declaredRepresentation);
this.effectiveRepresentation = requireNonNull(effectiveRepresentation);
}