+ public static @NonNull BindingRuntimeContext createRuntimeContext(
+ final Collection<? extends YangModuleInfo> infos) {
+ final ModuleInfoSnapshot snapshot;
+
+ try {
+ snapshot = prepareContext(ServiceLoaderState.ParserFactory.INSTANCE, infos);
+ } catch (YangParserException e) {
+ throw new IllegalStateException("Failed to parse models", e);
+ }
+
+ return new DefaultBindingRuntimeContext(
+ ServiceLoaderState.Generator.INSTANCE.generateTypeMapping(snapshot.getEffectiveModelContext()), snapshot);
+ }
+