/* * 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.stmt.reactor; import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement; import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.NamespaceStorageNode; import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.Registry; import org.opendaylight.yangtools.yang.parser.spi.source.SourceException; class RootStatementContext, E extends EffectiveStatement> extends StatementContextBase { private final SourceSpecificContext sourceContext; RootStatementContext(ContextBuilder builder, SourceSpecificContext sourceContext) throws SourceException { super(builder); this.sourceContext = sourceContext; } @Override public StatementContextBase getParentContext() { return null; } @Override public NamespaceStorageNode getParentNamespaceStorage() { return sourceContext; } @Override public Registry getBehaviourRegistry() { return sourceContext; } @Override public RootStatementContext getRoot() { return this; } SourceSpecificContext getSourceContext() { return sourceContext; } }