fa70bfb1f69accd2492e45ef5432433921ba407b
[mdsal.git] / binding / mdsal-binding-runtime-api / src / main / java / org / opendaylight / mdsal / binding / runtime / api / ModuleInfoSnapshot.java
1 /*
2  * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.binding.runtime.api;
9
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.concepts.Immutable;
13 import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
14 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
15 import org.opendaylight.yangtools.yang.model.api.source.YangTextSource;
16 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceProvider;
17
18 /**
19  * A snapshot of a set of {@link YangModuleInfo}s, assembled to form an {@link EffectiveModelContext}.
20  */
21 @Beta
22 public interface ModuleInfoSnapshot extends Immutable, SchemaSourceProvider<YangTextSource> {
23     /**
24      * The {@link EffectiveModelContext} resulting from all models exposed from constituent module infos.
25      *
26      * @return the resulting model context
27      */
28     @NonNull EffectiveModelContext modelContext();
29
30     <T> Class<T> loadClass(String fullyQualifiedName) throws ClassNotFoundException;
31 }