X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=mdsal.git;a=blobdiff_plain;f=binding%2Fmdsal-binding-generator%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fbinding%2Fgenerator%2Fimpl%2Freactor%2FModuleAugmentGenerator.java;h=ee590e72bf2db69aabe15d06229d3b18be0489e9;hp=f4c01a3e7e0f38bab1a9135925e0eb0620033a9b;hb=f0749e72cfb282d0043d2171afc85a23fe9931da;hpb=afdfd6c4d2812df08f523bb23e0d0860d3a55bc0 diff --git a/binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/ModuleAugmentGenerator.java b/binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/ModuleAugmentGenerator.java index f4c01a3e7e..ee590e72bf 100644 --- a/binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/ModuleAugmentGenerator.java +++ b/binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/ModuleAugmentGenerator.java @@ -7,8 +7,8 @@ */ package org.opendaylight.mdsal.binding.generator.impl.reactor; +import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yangtools.yang.model.api.stmt.AugmentEffectiveStatement; -import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier; /** * Generator corresponding to a {@code augment} statement used as a child of a {@code module} statement. @@ -18,14 +18,8 @@ final class ModuleAugmentGenerator extends AbstractAugmentGenerator { super(statement, parent); } - @Override - void loadTargetGenerator() { - throw new UnsupportedOperationException(); - } - - void linkAugmentationTarget(final GeneratorContext context) { - final SchemaNodeIdentifier path = statement().argument(); - final ModuleGenerator module = context.resolveModule(path.firstNodeIdentifier().getModule()); - setTargetGenerator(module.resolveSchemaNode(path)); + @NonNull AugmentRequirement startLinkage(final GeneratorContext context) { + return new AugmentRequirement(this, + context.resolveModule(statement().argument().firstNodeIdentifier().getModule())); } }