Add CopyPolicy.REJECT
[yangtools.git] / yang / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / StatementSupport.java
index 79658e8fecde0876d1f4a2fbc77c9e64fa3255ba..60d8a37aff5c576a55551522d8cf1d9eeef8ff8e 100644 (file)
@@ -263,6 +263,11 @@ public interface StatementSupport<A, D extends DeclaredStatement<A>, E extends E
          */
         // TODO: will the copy transition to ModelProcessingPhase.FULL_DECLARATION or which phase?
         DECLARED_COPY,
+        /**
+         * Reject any attempt to copy this statement. This is useful for statements that are defined as top-level
+         * constructs, such as {@code contact}, {@code deviation} and similar.
+         */
+        REJECT,
         /**
          * Ignore this statement's existence for the purposes of the new place -- it is not impacted. This guidance
          * is left here for completeness, as it can have justifiable uses (but I can't think of any). Any substatements