Hide BaseImplicitStatementSupport 23/95523/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 18 Mar 2021 12:01:44 +0000 (13:01 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 18 Mar 2021 12:02:50 +0000 (13:02 +0100)
This class, along with BaseOperationContainerStatementSupport is
an internal implementation detail. Since we have moved all their
users into a single package, move them as well, hiding them in
process.

Change-Id: I6fc3a38373bb5dbe9e812db6809aa9627afae836
JIRA: YANGTOOLS-1241
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/meta/AbstractImplicitStatementSupport.java [moved from yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/BaseImplicitStatementSupport.java with 79% similarity]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/meta/AbstractOperationContainerStatementSupport.java [moved from yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/BaseOperationContainerStatementSupport.java with 73% similarity]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/meta/CaseStatementSupport.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/meta/InputStatementSupport.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/meta/OutputStatementSupport.java

@@ -5,9 +5,8 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.yangtools.yang.parser.rfc7950.stmt;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.meta;
 
-import com.google.common.annotations.Beta;
 import com.google.common.collect.ImmutableList;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -26,10 +25,9 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
  * @param <D> Declared Statement representation
  * @param <E> Effective Statement representation
  */
-@Beta
-public abstract class BaseImplicitStatementSupport<D extends DeclaredStatement<QName>,
+abstract class AbstractImplicitStatementSupport<D extends DeclaredStatement<QName>,
         E extends SchemaTreeEffectiveStatement<D>> extends AbstractSchemaTreeStatementSupport<D, E> {
-    protected BaseImplicitStatementSupport(final StatementDefinition publicDefinition,
+    AbstractImplicitStatementSupport(final StatementDefinition publicDefinition,
             final StatementPolicy<QName, D> policy) {
         super(publicDefinition, policy);
     }
@@ -61,13 +59,13 @@ public abstract class BaseImplicitStatementSupport<D extends DeclaredStatement<Q
         }
     }
 
-    protected abstract @NonNull E copyDeclaredEffective(@NonNull Current<QName, D> stmt, @NonNull E original);
+    abstract @NonNull E copyDeclaredEffective(@NonNull Current<QName, D> stmt, @NonNull E original);
 
-    protected abstract @NonNull E copyUndeclaredEffective(@NonNull Current<QName, D> stmt, @NonNull E original);
+    abstract @NonNull E copyUndeclaredEffective(@NonNull Current<QName, D> stmt, @NonNull E original);
 
-    protected abstract @NonNull E createDeclaredEffective(@NonNull Current<QName, D> stmt,
+    abstract @NonNull E createDeclaredEffective(@NonNull Current<QName, D> stmt,
             @NonNull ImmutableList<? extends EffectiveStatement<?, ?>> substatements);
 
-    protected abstract @NonNull E createUndeclaredEffective(@NonNull Current<QName, D> stmt,
+    abstract @NonNull E createUndeclaredEffective(@NonNull Current<QName, D> stmt,
             @NonNull ImmutableList<? extends EffectiveStatement<?, ?>> substatements);
 }
@@ -5,11 +5,10 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.yangtools.yang.parser.rfc7950.stmt;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.meta;
 
 import static java.util.Objects.requireNonNull;
 
-import com.google.common.annotations.Beta;
 import com.google.common.collect.ImmutableList;
 import java.util.function.Function;
 import org.eclipse.jdt.annotation.NonNull;
@@ -33,12 +32,11 @@ import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
  * @param <D> Declared Statement representation
  * @param <E> Effective Statement representation
  */
-@Beta
-public abstract class BaseOperationContainerStatementSupport<D extends DeclaredStatement<QName>,
-        E extends SchemaTreeEffectiveStatement<D>> extends BaseImplicitStatementSupport<D, E> {
+abstract class AbstractOperationContainerStatementSupport<D extends DeclaredStatement<QName>,
+        E extends SchemaTreeEffectiveStatement<D>> extends AbstractImplicitStatementSupport<D, E> {
     private final Function<QNameModule, QName> createArgument;
 
-    protected BaseOperationContainerStatementSupport(final StatementDefinition publicDefinition,
+    AbstractOperationContainerStatementSupport(final StatementDefinition publicDefinition,
             final Function<QNameModule, QName> createArgument) {
         super(publicDefinition, uninstantiatedPolicy());
         this.createArgument = requireNonNull(createArgument);
@@ -50,27 +48,26 @@ public abstract class BaseOperationContainerStatementSupport<D extends DeclaredS
     }
 
     @Override
-    protected final @NonNull E copyDeclaredEffective(final Current<QName, D> stmt, final E original) {
+    final @NonNull E copyDeclaredEffective(final Current<QName, D> stmt, final E original) {
         return copyDeclaredEffective(
             EffectiveStatementMixins.historyAndStatusFlags(stmt.history(), original.effectiveSubstatements()),
             stmt, original);
     }
 
-    protected abstract @NonNull E copyDeclaredEffective(int flags, @NonNull Current<QName, D> stmt,
+    abstract @NonNull E copyDeclaredEffective(int flags, @NonNull Current<QName, D> stmt,
         @NonNull E original);
 
     @Override
-    protected final @NonNull E copyUndeclaredEffective(final Current<QName, D> stmt, final E original) {
+    final @NonNull E copyUndeclaredEffective(final Current<QName, D> stmt, final E original) {
         return copyUndeclaredEffective(
             EffectiveStatementMixins.historyAndStatusFlags(stmt.history(), original.effectiveSubstatements()),
             stmt, original);
     }
 
-    protected abstract @NonNull E copyUndeclaredEffective(int flags, @NonNull Current<QName, D> stmt,
-        @NonNull E original);
+    abstract @NonNull E copyUndeclaredEffective(int flags, @NonNull Current<QName, D> stmt, @NonNull E original);
 
     @Override
-    protected final @NonNull E createDeclaredEffective(final Current<QName, D> stmt,
+    final @NonNull E createDeclaredEffective(final Current<QName, D> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         try {
             return createDeclaredEffective(
@@ -80,16 +77,16 @@ public abstract class BaseOperationContainerStatementSupport<D extends DeclaredS
         }
     }
 
-    protected abstract @NonNull E createDeclaredEffective(int flags, @NonNull Current<QName, D> stmt,
+    abstract @NonNull E createDeclaredEffective(int flags, @NonNull Current<QName, D> stmt,
             @NonNull ImmutableList<? extends EffectiveStatement<?, ?>> substatements);
 
     @Override
-    protected final E createUndeclaredEffective(final Current<QName, D> stmt,
+    final E createUndeclaredEffective(final Current<QName, D> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         return createUndeclaredEffective(EffectiveStatementMixins.historyAndStatusFlags(stmt.history(), substatements),
             stmt, substatements);
     }
 
-    protected abstract @NonNull E createUndeclaredEffective(int flags, @NonNull Current<QName, D> stmt,
+    abstract @NonNull E createUndeclaredEffective(int flags, @NonNull Current<QName, D> stmt,
             @NonNull ImmutableList<? extends EffectiveStatement<?, ?>> substatements);
 }
index 9d1c991e30fcfa073bddc21fd535a4f67e7f2570..799398764e17d881b32dfcbb0f4be154f78dd150 100644 (file)
@@ -32,7 +32,6 @@ import org.opendaylight.yangtools.yang.model.ri.stmt.EffectiveStatements;
 import org.opendaylight.yangtools.yang.model.ri.stmt.ImplicitStatements;
 import org.opendaylight.yangtools.yang.model.spi.meta.EffectiveStatementMixins.EffectiveStatementWithFlags.FlagsBuilder;
 import org.opendaylight.yangtools.yang.model.spi.meta.SubstatementIndexingException;
-import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.BaseImplicitStatementSupport;
 import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
 import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Parent.EffectiveConfig;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
@@ -41,7 +40,7 @@ import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 
 @Beta
 public final class CaseStatementSupport
-        extends BaseImplicitStatementSupport<CaseStatement, CaseEffectiveStatement> {
+        extends AbstractImplicitStatementSupport<CaseStatement, CaseEffectiveStatement> {
     private static final @NonNull CaseStatementSupport RFC6020_INSTANCE = new CaseStatementSupport(
         SubstatementValidator.builder(YangStmtMapping.CASE)
             .addAny(YangStmtMapping.ANYXML)
index ec1a364f1741f871170d88b31343fa4aaacfbadb..2458dda4c569ed81f376f2499c527dd9afea6c1e 100644 (file)
@@ -24,7 +24,6 @@ import org.opendaylight.yangtools.yang.model.ri.stmt.DeclaredStatements;
 import org.opendaylight.yangtools.yang.model.ri.stmt.EffectiveStatements;
 import org.opendaylight.yangtools.yang.model.ri.stmt.ImplicitStatements;
 import org.opendaylight.yangtools.yang.model.spi.meta.SubstatementIndexingException;
-import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.BaseOperationContainerStatementSupport;
 import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
@@ -32,7 +31,7 @@ import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 
 @Beta
 public final class InputStatementSupport
-        extends BaseOperationContainerStatementSupport<InputStatement, InputEffectiveStatement> {
+        extends AbstractOperationContainerStatementSupport<InputStatement, InputEffectiveStatement> {
     private static final @NonNull InputStatementSupport RFC6020_INSTANCE = new InputStatementSupport(
         SubstatementValidator.builder(YangStmtMapping.INPUT)
             .addAny(YangStmtMapping.ANYXML)
@@ -95,21 +94,19 @@ public final class InputStatementSupport
     }
 
     @Override
-    protected InputEffectiveStatement copyDeclaredEffective(final int flags,
-            final Current<QName, InputStatement> stmt, final InputEffectiveStatement original) {
-        return EffectiveStatements.copyInput(original, stmt.effectivePath(),
-            flags);
+    InputEffectiveStatement copyDeclaredEffective(final int flags, final Current<QName, InputStatement> stmt,
+            final InputEffectiveStatement original) {
+        return EffectiveStatements.copyInput(original, stmt.effectivePath(), flags);
     }
 
     @Override
-    protected InputEffectiveStatement copyUndeclaredEffective(final int flags,
-            final Current<QName, InputStatement> stmt, final InputEffectiveStatement original) {
+    InputEffectiveStatement copyUndeclaredEffective(final int flags, final Current<QName, InputStatement> stmt,
+            final InputEffectiveStatement original) {
         return EffectiveStatements.copyInput(original, stmt.effectivePath(), flags);
     }
 
     @Override
-    protected InputEffectiveStatement createDeclaredEffective(final int flags,
-            final Current<QName, InputStatement> stmt,
+    InputEffectiveStatement createDeclaredEffective(final int flags, final Current<QName, InputStatement> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         try {
             return EffectiveStatements.createInput(stmt.declared(), stmt.effectivePath(), flags, substatements);
@@ -119,8 +116,7 @@ public final class InputStatementSupport
     }
 
     @Override
-    protected InputEffectiveStatement createUndeclaredEffective(final int flags,
-            final Current<QName, InputStatement> stmt,
+    InputEffectiveStatement createUndeclaredEffective(final int flags, final Current<QName, InputStatement> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         try {
             return EffectiveStatements.createInput(stmt.effectivePath(), flags, substatements);
index cff8b15fde8c2e65e340d4a25cb09f8cbb40c2be..3c21eb479da9cafaff7fe644784f274f0c0b3d41 100644 (file)
@@ -24,7 +24,6 @@ import org.opendaylight.yangtools.yang.model.ri.stmt.DeclaredStatements;
 import org.opendaylight.yangtools.yang.model.ri.stmt.EffectiveStatements;
 import org.opendaylight.yangtools.yang.model.ri.stmt.ImplicitStatements;
 import org.opendaylight.yangtools.yang.model.spi.meta.SubstatementIndexingException;
-import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.BaseOperationContainerStatementSupport;
 import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
@@ -32,7 +31,7 @@ import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 
 @Beta
 public final class OutputStatementSupport
-        extends BaseOperationContainerStatementSupport<OutputStatement, OutputEffectiveStatement> {
+        extends AbstractOperationContainerStatementSupport<OutputStatement, OutputEffectiveStatement> {
     private static final @NonNull OutputStatementSupport RFC6020_INSTANCE = new OutputStatementSupport(
         SubstatementValidator.builder(YangStmtMapping.OUTPUT)
             .addAny(YangStmtMapping.ANYXML)
@@ -95,20 +94,19 @@ public final class OutputStatementSupport
     }
 
     @Override
-    protected OutputEffectiveStatement copyDeclaredEffective(final int flags,
-            final Current<QName, OutputStatement> stmt, final OutputEffectiveStatement original) {
+    OutputEffectiveStatement copyDeclaredEffective(final int flags, final Current<QName, OutputStatement> stmt,
+            final OutputEffectiveStatement original) {
         return EffectiveStatements.copyOutput(original, stmt.effectivePath(), flags);
     }
 
     @Override
-    protected OutputEffectiveStatement copyUndeclaredEffective(final int flags,
-            final Current<QName, OutputStatement> stmt, final OutputEffectiveStatement original) {
+    OutputEffectiveStatement copyUndeclaredEffective(final int flags, final Current<QName, OutputStatement> stmt,
+            final OutputEffectiveStatement original) {
         return EffectiveStatements.copyOutput(original, stmt.effectivePath(), flags);
     }
 
     @Override
-    protected OutputEffectiveStatement createDeclaredEffective(final int flags,
-            final Current<QName, OutputStatement> stmt,
+    OutputEffectiveStatement createDeclaredEffective(final int flags, final Current<QName, OutputStatement> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         try {
             return EffectiveStatements.createOutput(stmt.declared(), stmt.effectivePath(), flags, substatements);
@@ -118,8 +116,7 @@ public final class OutputStatementSupport
     }
 
     @Override
-    protected OutputEffectiveStatement createUndeclaredEffective(final int flags,
-            final Current<QName, OutputStatement> stmt,
+    OutputEffectiveStatement createUndeclaredEffective(final int flags, final Current<QName, OutputStatement> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
         try {
             return EffectiveStatements.createOutput(stmt.effectivePath(), flags, substatements);