*/
package org.opendaylight.yangtools.yang.model.api;
+import com.google.common.annotations.Beta;
+
/**
* Trait interface for {@link SchemaNode}s, which have the {@link #isAddedByUses()} method.
- *
- * @deprecated This interface relates to declared model rather than to effective mode and as such should not
- * exist. It is provided to provide common method definition and eash migration of users.
*/
-@Deprecated
+@Beta
+//FIXME: 8.0.0: refactor this interface to take into account DerivableSchemaNode
public interface AddedByUsesAware {
/**
* Returns <code>true</code> if this node was added by uses statement,
*/
package org.opendaylight.yangtools.yang.model.api;
-import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
+import com.google.common.annotations.Beta;
/**
* Represents a node that can be added by uses or by augmentation.
- *
- * @deprecated Aside from the deprecated {@link AddedByUsesAware} contract, this interface adds only a trait related
- * to now how we arrived at this effective node. Users who need to know this information should really be
- * looking at the {@link DeclaredStatement} world, which holds the original node definition.
*/
-@Deprecated
+@Beta
+// FIXME: 8.0.0: refactor this interface to take into account DerivableSchemaNode
public interface CopyableNode extends AddedByUsesAware {
/**
* Returns <code>true</code> if this node was added by augmentation,
import java.util.Optional;
/**
- * Schema Node which may be derived from other schema node
- * using augmentation or uses statement.
- *
+ * Schema Node which may be derived from other schema node using augmentation or uses statement.
*/
+// FIXME: 8.0.0: refactor this interface to take into account CopyableNode and AddedByUsesAware
public interface DerivableSchemaNode extends DataSchemaNode {
-
/**
* If this node is added by uses, returns original node definition from
* grouping where it was defined.
* @return original node definition from grouping if this node is added by
* uses, Optional.absent otherwise
*/
+ // FIXME: 8.0.0: this should be a type capture as it always matches this node's type
Optional<? extends SchemaNode> getOriginal();
-
}
public interface AddedByUsesMixin<A, D extends DeclaredStatement<A>>
extends EffectiveStatementWithFlags<A, D>, AddedByUsesAware {
@Override
- @Deprecated
default boolean isAddedByUses() {
return (flags() & FlagsBuilder.ADDED_BY_USES) != 0;
}
*/
public interface CopyableMixin<A, D extends DeclaredStatement<A>> extends AddedByUsesMixin<A, D>, CopyableNode {
@Override
- @Deprecated
default boolean isAugmenting() {
return (flags() & FlagsBuilder.AUGMENTING) != 0;
}
}
@Override
- @Deprecated
public boolean isAugmenting() {
return (operations & IS_AUGMENTING_BITS) != 0;
}
@Override
- @Deprecated
public boolean isAddedByUses() {
return (operations & IS_ADDED_BY_USES_BITS) != 0;
}