Deprecate old interfaces CodeGenerator interfaces 35/52035/56
authorRobert Varga <rovarga@cisco.com>
Sat, 18 Feb 2017 13:34:02 +0000 (14:34 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 2 Nov 2020 12:02:48 +0000 (12:02 +0000)
BasicCodeGenerator and BuildContextAware should be deprecated, as
we have a generalized FileGenerator replacement for them.

JIRA: YANGTOOLS-1148
Change-Id: I0cd0bcfd2314605188b9bfb2204298e2c7eea7a6
Signed-off-by: Robert Varga <rovarga@cisco.com>
plugin/yang-maven-plugin-spi/src/main/java/org/opendaylight/yangtools/yang2sources/spi/BasicCodeGenerator.java
plugin/yang-maven-plugin-spi/src/main/java/org/opendaylight/yangtools/yang2sources/spi/BuildContextAware.java
plugin/yang-maven-plugin-spi/src/main/java/org/opendaylight/yangtools/yang2sources/spi/MavenProjectAware.java
plugin/yang-maven-plugin-spi/src/main/java/org/opendaylight/yangtools/yang2sources/spi/ModuleResourceResolver.java

index 8f621ddb11ddf70ee3fa27decce51d78aad5d3e4..9238ec12304da3b83dc031a7bec646bbbd996f9e 100644 (file)
@@ -19,7 +19,10 @@ import org.opendaylight.yangtools.yang.model.api.Module;
 
 /**
  * Maven 3.1.x and newer uses SLF4J internally, which means we do not need to pass a logger instance around.
+ *
+ * @deprecated Use {@link FileGenerator} instead.
  */
+@Deprecated
 public interface BasicCodeGenerator {
     enum ImportResolutionMode {
         /**
index 0a3a6ea4a5b0019bf31f9bcdd89940f08df3c897..625a0d3f77223e3f7c3b8cdb3510474118bd3f2a 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.yangtools.yang2sources.spi;
 
+import org.opendaylight.yangtools.plugin.generator.api.FileGenerator;
 import org.sonatype.plexus.build.incremental.BuildContext;
 
 /**
@@ -14,7 +15,10 @@ import org.sonatype.plexus.build.incremental.BuildContext;
  * with BuildContext. These will have the build context injected before any
  * attempt is made to generate files and should interact with the reactor solely
  * through it.
+ *
+ * @deprecated Use {@link FileGenerator} instead.
  */
+@Deprecated
 public interface BuildContextAware {
     /**
      * Set the build context to be used during the lifetime of this reactor.
index 2787ed5b6ca131d9c068f44b6033bf48bacb078b..c3be8fa80b2a5f1de2ff157903395194260e8105 100644 (file)
@@ -8,10 +8,14 @@
 package org.opendaylight.yangtools.yang2sources.spi;
 
 import org.apache.maven.project.MavenProject;
+import org.opendaylight.yangtools.plugin.generator.api.FileGeneratorFactory;
 
 /**
  * Bridge for plugins which need access to the underlying maven project.
+ *
+ * @deprecated Use {@link FileGeneratorFactory} instead.
  */
+@Deprecated
 public interface MavenProjectAware {
     /**
      * Provided maven project object. Any additional information about current
index 62af2042b52a65c1ebd7eb5a22b48c2dd1410747..d1e5a0e38f773e0de2c3056bf45dfac57c75a903 100644 (file)
@@ -13,8 +13,11 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 /**
  * An SPI-level interface to find the schema source for a particular YANG module, as packaged in the final artifact.
  * The module must be part of the current resolution context.
+ *
+ * @deprecated Use {@link org.opendaylight.yangtools.plugin.generator.api.ModuleResourceResolver} instead.
  */
 @Beta
+@Deprecated
 @FunctionalInterface
 @SuppressFBWarnings(value = "NM_SAME_SIMPLE_NAME_AS_INTERFACE", justification = "Migration to new place")
 public interface ModuleResourceResolver extends org.opendaylight.yangtools.plugin.generator.api.ModuleResourceResolver {