X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fspi%2Fmeta%2FAbstractStatementSupport.java;h=3fb3758f32fd40d56bce45c4f03bbafc6d3a9119;hb=c24d6e2f39acbb11e22b5676bb7481ed52bec461;hp=b0c23ea3c5ea83c4dd1463285279089da4df460d;hpb=125664d011d7ae1c64b1cc0ddfea3ca2ec45a97b;p=yangtools.git diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/AbstractStatementSupport.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/AbstractStatementSupport.java index b0c23ea3c5..3fb3758f32 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/AbstractStatementSupport.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/AbstractStatementSupport.java @@ -8,6 +8,7 @@ package org.opendaylight.yangtools.yang.parser.spi.meta; import com.google.common.base.Preconditions; +import javax.annotation.Nonnull; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement; import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement; @@ -38,6 +39,7 @@ public abstract class AbstractStatementSupport this.type = Preconditions.checkNotNull(publicDefinition); } + @Nonnull @Override public final QName getStatementName() { return type.getStatementName(); @@ -48,13 +50,15 @@ public abstract class AbstractStatementSupport return type.getArgumentName(); } + @Nonnull @Override public final Class> getDeclaredRepresentationClass() { return type.getDeclaredRepresentationClass(); } + @Nonnull @Override - public final Class> getEffectiveRepresentationClass() { + public final Class> getEffectiveRepresentationClass() { return type.getEffectiveRepresentationClass(); } @@ -81,7 +85,7 @@ public abstract class AbstractStatementSupport * */ @Override - public void onLinkageDeclared(StmtContext.Mutable stmt) throws InferenceException, SourceException { + public void onPreLinkageDeclared(StmtContext.Mutable stmt) { // NOOP for most implementations } @@ -95,8 +99,7 @@ public abstract class AbstractStatementSupport * */ @Override - public void onStatementDefinitionDeclared(StmtContext.Mutable stmt) throws InferenceException, - SourceException { + public void onLinkageDeclared(StmtContext.Mutable stmt) throws SourceException { // NOOP for most implementations } @@ -110,8 +113,26 @@ public abstract class AbstractStatementSupport * */ @Override - public void onFullDefinitionDeclared(StmtContext.Mutable stmt) throws InferenceException, SourceException { + public void onStatementDefinitionDeclared(StmtContext.Mutable stmt) throws SourceException { // NOOP for most implementations } + /** + * + * {@inheritDoc} + * + * Subclasses of this class may override this method to perform actions on + * this event or register modification action using + * {@link StmtContext.Mutable#newInferenceAction(ModelProcessingPhase)}. + * + */ + @Override + public void onFullDefinitionDeclared(StmtContext.Mutable stmt) throws SourceException { + // NOOP for most implementations + } + + @Override + public boolean isArgumentYinElement() { + return getPublicView().isArgumentYinElement(); + } }