isAddedByUses() is used only by mdsal's binding components, which should
be able to get by without this guidance. Deprecate the interface along
with its support bits.
JIRA: YANGTOOLS-1351
Change-Id: Ic8b07b995f49cece48d1a90ed51723485d88120d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
1d4620040587f510d1b5f0ce99b13c54350ef6eb)
/**
* Trait interface for {@link SchemaNode}s, which have the {@link #isAddedByUses()} method.
+ *
+ * @deprecated The only user of this trait is MD-SAL's binding component. As such, we provide enough information in
+ * EffectiveStatement tree to reconstruct this information.
*/
@Beta
-//FIXME: 8.0.0: refactor this interface to take into account DerivableSchemaNode
+@Deprecated(since = "7.0.9")
public interface AddedByUsesAware {
/**
- * Returns <code>true</code> if this node was added by uses statement,
- * otherwise returns <code>false</code>.
+ * Returns {@code true} if this node was added by uses statement, otherwise returns {@code false}.
*
- * @return <code>true</code> if this node was added by uses statement,
- * otherwise returns <code>false</code>
+ * @return {@code true} if this node was added by uses statement, otherwise returns {@code false}
*/
boolean isAddedByUses();
}
*
* @param <A> Argument type ({@link Empty} if statement does not have argument.)
* @param <D> Class representing declared version of this statement.
+ * @deprecated See deprecation notice in {@link AddedByUsesAware}
*/
+ @Deprecated(since = "7.0.9")
public interface AddedByUsesMixin<A, D extends DeclaredStatement<A>>
extends EffectiveStatementWithFlags<A, D>, AddedByUsesAware {
@Override
+ @Deprecated(since = "7.0.9")
default boolean isAddedByUses() {
return (flags() & FlagsBuilder.ADDED_BY_USES) != 0;
}
static final int MANDATORY = 0x0004;
static final int AUGMENTING = 0x0010;
+ @Deprecated(since = "7.0.9")
static final int ADDED_BY_USES = 0x0020;
private static final int MASK_HISTORY = 0x0030;
// Bottom 4 bits, encoding a CopyHistory, aight?
private static final byte COPY_ORIGINAL = 0x00;
private static final byte COPY_LAST_TYPE_MASK = 0x03;
+ @Deprecated(since = "7.0.9")
private static final byte COPY_ADDED_BY_USES = 0x04;
private static final byte COPY_ADDED_BY_AUGMENTATION = 0x08;
}
@Override
+ @Deprecated(since = "7.0.9")
public final boolean isAddedByUses() {
return (bitsAight & COPY_ADDED_BY_USES) != 0;
}