2 * Copyright (c) 2021 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.mdsal.binding.generator.impl.reactor;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.yang.model.api.stmt.AugmentEffectiveStatement;
12 import org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack;
15 * Generator corresponding to a {@code augment} statement used as a child of a {@code module} statement.
17 final class ModuleAugmentGenerator extends AbstractAugmentGenerator {
18 ModuleAugmentGenerator(final AugmentEffectiveStatement statement, final AbstractCompositeGenerator<?, ?> parent) {
19 super(statement, parent);
22 @NonNull AugmentRequirement startLinkage(final GeneratorContext context) {
23 setTargetStatement(SchemaInferenceStack.of(context.getEffectiveModelContext())
24 .enterSchemaTree(statement().argument()));
26 return new AugmentRequirement(this,
27 context.resolveModule(statement().argument().firstNodeIdentifier().getModule()));