Seal ModelStatement
[yangtools.git] / model / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / meta / AbstractModelStatement.java
similarity index 94%
rename from model/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/meta/AbstractModelStatement.java
rename to model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/AbstractModelStatement.java
index 0ae7e01b244e81b1ea78364ab9e9ffe07c6a976c..c424c6acbd759cc664b5d47061e6e274afc59e76 100644 (file)
@@ -5,7 +5,7 @@
  * 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.model.spi.meta;
+package org.opendaylight.yangtools.yang.model.api.meta;
 
 import com.google.common.base.MoreObjects;
 import com.google.common.base.MoreObjects.ToStringHelper;
@@ -13,7 +13,6 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.Empty;
-import org.opendaylight.yangtools.yang.model.api.meta.ModelStatement;
 
 /**
  * Abstract base class for {@link ModelStatement} implementations. It mostly provides static methods for efficiently
@@ -21,8 +20,8 @@ import org.opendaylight.yangtools.yang.model.api.meta.ModelStatement;
  *
  * @param <A> Argument type ({@link Empty} if statement does not have argument.)
  */
-abstract class AbstractModelStatement<A> implements ModelStatement<A> {
-
+abstract sealed class AbstractModelStatement<A> implements ModelStatement<A>
+        permits AbstractDeclaredStatement, AbstractEffectiveStatement {
     @Override
     public final int hashCode() {
         return System.identityHashCode(this);