--- /dev/null
+/*
+ * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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
+ */
+module org.opendaylight.mdsal.binding.runtime.spi {
+ exports org.opendaylight.mdsal.binding.runtime.spi;
+
+ requires transitive org.opendaylight.yangtools.yang.parser.api;
+ requires transitive org.opendaylight.mdsal.binding.runtime.api;
+ requires org.opendaylight.yangtools.concepts;
+ requires org.opendaylight.yangtools.yang.parser.impl;
+ requires org.opendaylight.mdsal.binding.spec.util;
+ requires org.opendaylight.yangtools.util;
+ requires org.slf4j;
+
+ uses org.opendaylight.yangtools.yang.model.parser.api.YangParserFactory;
+ uses org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeGenerator;
+
+ // Annotations
+ requires static transitive org.eclipse.jdt.annotation;
+ requires static com.github.spotbugs.annotations;
+ requires static org.checkerframework.checker.qual;
+}
import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
import org.opendaylight.yangtools.concepts.Mutable;
import org.opendaylight.yangtools.concepts.ObjectRegistration;
+import org.opendaylight.yangtools.concepts.Registration;
import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
import org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver;
-import org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaSourceRegistration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Beta
public final class ModuleInfoSnapshotResolver implements Mutable {
private static final class RegisteredModuleInfo {
- final YangTextSchemaSourceRegistration reg;
+ final Registration reg;
final YangModuleInfo info;
final ClassLoader loader;
private int refcount = 1;
- RegisteredModuleInfo(final YangModuleInfo info, final YangTextSchemaSourceRegistration reg,
- final ClassLoader loader) {
+ RegisteredModuleInfo(final YangModuleInfo info, final Registration reg, final ClassLoader loader) {
this.info = requireNonNull(info);
this.reg = requireNonNull(reg);
this.loader = requireNonNull(loader);
}
// Create an explicit registration
- final YangTextSchemaSourceRegistration reg;
+ final Registration reg;
try {
reg = ctxResolver.registerSource(toYangTextSource(sourceId, info));
} catch (YangSyntaxErrorException | SchemaSourceException | IOException e) {