/* * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * 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.spi.meta; import java.util.Collection; import javax.annotation.Nonnull; import javax.annotation.Nullable; 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.IdentifierNamespace; import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition; import org.opendaylight.yangtools.yang.model.api.meta.StatementSource; import org.opendaylight.yangtools.yang.parser.spi.source.StatementSourceReference; public interface StmtContext, E extends EffectiveStatement> { @Nonnull StatementSource getStatementSource(); @Nonnull StatementSourceReference getStatementSourceReference(); @Nonnull StatementDefinition getPublicDefinition(); @Nullable StmtContext getParentContext(); @Nullable String rawStatementArgument(); @Nullable A getStatementArgument(); @Nonnull > VT getFromNamespace(Class type, K key) throws NamespaceNotAvailableException; @Nonnull StmtContext getRoot(); @Nonnull Collection> declaredSubstatements(); D buildDeclared(); E buildEffective(); interface Mutable,E extends EffectiveStatement> extends StmtContext { @Override StmtContext.Mutable getParentContext(); > void addToNs(Class type, K key, VT value) throws NamespaceNotAvailableException; @Override StmtContext.Mutable getRoot(); ModelActionBuilder newInferenceAction(ModelProcessingPhase phase); > void addContext(Class namepsace, KT key, StmtContext stmt); } }