Do not force materialization when not needed
[yangtools.git] / yang / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / StatementSupport.java
index 419c28c60d216e644a1a0acdf1ba84614e6573ab..05e5f47f4c8e0348ca9e72c50049eead268e3614 100644 (file)
@@ -17,7 +17,6 @@ import org.opendaylight.yangtools.yang.model.api.meta.ArgumentDefinition;
 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 
 /**
@@ -175,34 +174,6 @@ public interface StatementSupport<A, D extends DeclaredStatement<A>, E extends E
      */
     @NonNull CopyPolicy copyPolicy();
 
-    /**
-     * Determine reactor copy behaviour of a statement instance. Statement support classes are required to determine
-     * their operations with regard to their statements being replicated into different contexts, so that
-     * {@link Mutable} instances are not created when it is evident they are superfluous.
-     *
-     * <p>
-     * The copy operation has three intrinsic parts:
-     * <ul>
-     *   <li>target {@code parent}, i.e. new parent statement for the copy. This determines things like default value
-     *       of the {@code config} statement and similar</li>
-     *   <li>copy operation type</li>
-     *   <li>{@code target module}, which defines the default namespace for the statement copy. This might not be always
-     *       present, in which case the namespace is retained from the source. As an example, {@code uses} changes
-     *       the default namespace to parent's namespace, whereas {@code augment} does not.</li>
-     * </ul>
-     *
-     * <p>
-     * Implementations should return the context to use -- returning {@code stmt} if there is no change or a copy of it.
-     *
-     * @param stmt Context of statement to be copied statement
-     * @param parent Parent statement context
-     * @param copyType Type of copy being performed
-     * @param targetModule Target module, if present
-     * @return StmtContext holding the effective state
-     */
-    @NonNull StmtContext<?, ?, ?> effectiveCopyOf(StmtContext<?, ?, ?> stmt, Mutable<?, ?, ?> parent, CopyType copyType,
-        @Nullable QNameModule targetModule);
-
     /**
      * Given a raw string representation of an argument, try to use a shared representation.
      *
@@ -272,8 +243,7 @@ public interface StatementSupport<A, D extends DeclaredStatement<A>, E extends E
 
     /**
      * Statement context copy policy, indicating how should reactor handle statement copy operations. Every statement
-     * copied by the reactor is subject to policy check done by
-     * {@link StatementSupport#effectiveCopyOf(StmtContext, Mutable, CopyType, QNameModule)}.
+     * copied by the reactor is subject to this policy.
      */
     enum CopyPolicy {
         /**