Rework BindingRuntimeTypes
[mdsal.git] / binding / mdsal-binding-generator / src / main / java / org / opendaylight / mdsal / binding / generator / impl / reactor / InputGenerator.java
diff --git a/binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/InputGenerator.java b/binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/InputGenerator.java
new file mode 100644 (file)
index 0000000..2400b4a
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.generator.impl.reactor;
+
+import java.util.List;
+import org.opendaylight.mdsal.binding.generator.impl.rt.DefaultInputRuntimeType;
+import org.opendaylight.mdsal.binding.model.api.GeneratedType;
+import org.opendaylight.mdsal.binding.model.ri.BindingTypes;
+import org.opendaylight.mdsal.binding.runtime.api.AugmentRuntimeType;
+import org.opendaylight.mdsal.binding.runtime.api.InputRuntimeType;
+import org.opendaylight.mdsal.binding.runtime.api.RuntimeType;
+import org.opendaylight.yangtools.yang.model.api.stmt.InputEffectiveStatement;
+
+/**
+ * Generator corresponding to an {@code input} statement.
+ */
+class InputGenerator extends OperationContainerGenerator<InputEffectiveStatement, InputRuntimeType> {
+    InputGenerator(final InputEffectiveStatement statement, final AbstractCompositeGenerator<?, ?> parent) {
+        super(statement, parent, BindingTypes.RPC_INPUT);
+    }
+
+    @Override
+    final InputRuntimeType createRuntimeType(final GeneratedType type, final InputEffectiveStatement statement,
+            final List<RuntimeType> children, final List<AugmentRuntimeType> augments) {
+        return new DefaultInputRuntimeType(type, statement, children, augments);
+    }
+}