Deprecate EffectiveStatementBase for removal 05/90905/3
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Jul 2020 22:27:43 +0000 (00:27 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Jul 2020 22:47:28 +0000 (00:47 +0200)
With all immediate users migrated or deprecated, mark the grim
future for this class, slating it for removal/integration.

JIRA: YANGTOOLS-1065
Change-Id: I4d06bdceedc3fcf5e45125f2f7fcfffe3de7d35e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/AbstractEffectiveDocumentedNode.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/DeclaredEffectiveStatementBase.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/EffectiveStatementBase.java

index 91394a2032754d1a8713eedc0661cee06f78c088..f85da9d118b4e8bf019816f6dbac0458bb11f5bc 100644 (file)
@@ -17,6 +17,7 @@ import org.opendaylight.yangtools.yang.model.api.stmt.ReferenceEffectiveStatemen
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
 @Beta
+@Deprecated(forRemoval = true)
 // FIXME: 6.0.0: fold this into AbstractEffectiveDocumentedNodeWithStatus
 public abstract class AbstractEffectiveDocumentedNode<A, D extends DeclaredStatement<A>>
         extends DeclaredEffectiveStatementBase<A, D> implements DocumentedNode {
index fad96f27a74c2ca7d1e8e96458cb1d55adc56406..132bb32f2ceb65c865f782bd7eef432ddb435f39 100644 (file)
@@ -13,6 +13,13 @@ import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
 import org.opendaylight.yangtools.yang.model.api.meta.StatementSource;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
+/**
+ * A declared {@link EffectiveStatementBase}.
+ *
+ * @deprecated Use {@link AbstractDeclaredEffectiveStatement} and its subclasses instead.
+ */
+@Deprecated(forRemoval = true)
+// FIXME: 6.0.0: fold this into AbstractEffectiveDocumentedNodeWithStatus
 public abstract class DeclaredEffectiveStatementBase<A, D extends DeclaredStatement<A>> extends
         EffectiveStatementBase<A, D> {
 
@@ -23,8 +30,7 @@ public abstract class DeclaredEffectiveStatementBase<A, D extends DeclaredStatem
     /**
      * Constructor.
      *
-     * @param ctx
-     *            context of statement.
+     * @param ctx context of statement.
      */
     protected DeclaredEffectiveStatementBase(final StmtContext<A, D, ?> ctx) {
         super(ctx);
index 77ceab24e06213cb0908451722abb10e766ae8bc..35a630d661d1e39a4a111cb6a68af5ea4f2955e3 100644 (file)
@@ -23,6 +23,9 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
  *
  * @param <A> Argument type ({@link Void} if statement does not have argument.)
  * @param <D> Class representing declared version of this statement.
+ *
+ * @deprecated This class has a number of design problems. Please use either {@link AbstractDeclaredEffectiveStatement}
+ *             or {@link AbstractUndeclaredEffectiveStatement} instead.
  */
 // TODO: This class is problematic in that it interacts with its subclasses via methods which are guaranteed to allows
 //       atrocities like RecursiveObjectLeaker tricks. That should be avoided and pushed to caller in a way where
@@ -31,6 +34,8 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 //
 //       From memory efficiency perspective, it is very common to have effective statements without any substatements,
 //       in which case 'substatements' field is redundant.
+@Deprecated(forRemoval = true)
+// FIXME: 6.0.0: fold this into AbstractEffectiveDocumentedNodeWithStatus
 public abstract class EffectiveStatementBase<A, D extends DeclaredStatement<A>>
         extends AbstractEffectiveStatement<A, D> {
     private final @NonNull ImmutableList<? extends EffectiveStatement<?, ?>> substatements;
@@ -51,6 +56,7 @@ public abstract class EffectiveStatementBase<A, D extends DeclaredStatement<A>>
      * @param substatementsInit proposed substatements
      * @return Filtered substatements
      */
+    // FIXME: 6.0.0: this facility is only overridden by ExtensionEffectiveStatementImpl
     protected Collection<? extends EffectiveStatement<?, ?>> initSubstatements(
             final Collection<? extends StmtContext<?, ?, ?>> substatementsInit) {
         return Collections2.transform(Collections2.filter(substatementsInit,