Promote BaseBooleanStatementSupport
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / config / ConfigStatementSupport.java
index 1990615667770f5bd228dbc0b2c25123f36d28b4..9609c939920a1ef090b6dc46fcbe6710042fdb12 100644 (file)
@@ -13,19 +13,23 @@ 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.stmt.ConfigEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ConfigStatement;
-import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.BaseBooleanStatementSupport;
+import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractBooleanStatementSupport;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
 
 public final class ConfigStatementSupport
-        extends BaseBooleanStatementSupport<ConfigStatement, ConfigEffectiveStatement> {
+        extends AbstractBooleanStatementSupport<ConfigStatement, ConfigEffectiveStatement> {
     private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(
         YangStmtMapping.CONFIG).build();
     private static final ConfigStatementSupport INSTANCE = new ConfigStatementSupport();
 
     private ConfigStatementSupport() {
-        super(YangStmtMapping.CONFIG, new EmptyConfigEffectiveStatement(new EmptyConfigStatement(Boolean.FALSE)),
-            new EmptyConfigEffectiveStatement(new EmptyConfigStatement(Boolean.TRUE)), CopyPolicy.CONTEXT_INDEPENDENT);
+        super(YangStmtMapping.CONFIG,
+            new EmptyConfigEffectiveStatement(new EmptyConfigStatement(Boolean.FALSE)),
+            new EmptyConfigEffectiveStatement(new EmptyConfigStatement(Boolean.TRUE)),
+            // FIXME: This is not quite true. If we are instantiated in a context which ignores config, which should
+            //        really fizzle. This needs some more analysis.
+            StatementPolicy.contextIndependent());
     }
 
     public static ConfigStatementSupport getInstance() {