Deprecate CopyableNode 45/98945/4
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 12 Dec 2021 06:50:13 +0000 (07:50 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 12 Dec 2021 09:03:28 +0000 (10:03 +0100)
// FIXME: add jira issue

Change-Id: Idbd09e698add7e5ae84ab0116591fae7691eb121
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/CopyableNode.java
model/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/meta/EffectiveStatementMixins.java
parser/yang-parser-reactor/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/StatementContextBase.java

index 34c92e73978ff28b02e4f38acf85e99b5020a30e..18af42a48264bb758c47b5207fd6fe6deb7c4753 100644 (file)
@@ -13,14 +13,12 @@ import com.google.common.annotations.Beta;
  * Represents a node that can be added by uses or by augmentation.
  */
 @Beta
-// FIXME: 8.0.0: refactor this interface to take into account DerivableSchemaNode
+@Deprecated(since = "8.0.0")
 public interface CopyableNode extends AddedByUsesAware {
     /**
-     * Returns <code>true</code> if this node was added by augmentation,
-     * otherwise returns <code>false</code>.
+     * Returns {@code true} if this node was added by augmentation, otherwise returns {@code false}.
      *
-     * @return <code>true</code> if this node was added by augmentation,
-     *         otherwise returns <code>false</code>
+     * @return {@code true} if this node was added by augmentation, otherwise returns {@code false}
      */
     boolean isAugmenting();
 }
index 80cffe88789c76183663c82f187e4b29b0c30ca2..b0b0e6780b143a8070afd6d665384c0a4fa85561 100644 (file)
@@ -149,9 +149,12 @@ public final class EffectiveStatementMixins {
      *
      * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
+     * @deprecated Scheduled for removal with {@link CopyableNode}.
      */
+    @Deprecated(since = "8.0.0")
     public interface CopyableMixin<A, D extends DeclaredStatement<A>> extends AddedByUsesMixin<A, D>, CopyableNode {
         @Override
+        @Deprecated(since = "8.0.0")
         default boolean isAugmenting() {
             return (flags() & FlagsBuilder.AUGMENTING) != 0;
         }
index 2455bfe6b4e56f0e5db822ce30626721124214f4..c11ef99baf9ddffa5dcb58b30a6836a98f8c4615 100644 (file)
@@ -227,6 +227,7 @@ public abstract class StatementContextBase<A, D extends DeclaredStatement<A>, E
     }
 
     @Override
+    @Deprecated(since = "8.0.0")
     public final boolean isAugmenting() {
         return (bitsAight & COPY_ADDED_BY_AUGMENTATION) != 0;
     }