2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.model.spi.stmt;
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ImmutableList;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.InputStatement;
18 * Static entry point to instantiating {@link DeclaredStatements} covered in the {@code RFC7950} metamodel which are
19 * not really declared, i.e. inferred to exist.
23 public final class UndeclaredStatements {
24 private UndeclaredStatements() {
28 public static InputStatement createInput(final QName argument) {
29 return new EmptyUndeclaredInputStatement(argument);
32 public static InputStatement createInput(final QName argument,
33 final ImmutableList<? extends DeclaredStatement<?>> substatements) {
34 return substatements.isEmpty() ? createInput(argument)
35 : new RegularUndeclaredInputStatement(argument, substatements);