import org.opendaylight.yangtools.yang.binding.util.BindingReflections;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
import org.opendaylight.yangtools.yang.binding.util.BindingReflections;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
String modulePackageName = BindingReflections.getModelRootPackageName(fullyQualifiedName);
WeakReference<ClassLoader> classLoaderRef = packageNameToClassLoader.get(modulePackageName);
String modulePackageName = BindingReflections.getModelRootPackageName(fullyQualifiedName);
WeakReference<ClassLoader> classLoaderRef = packageNameToClassLoader.get(modulePackageName);
if (classLoaderRef != null && (classloader = classLoaderRef.get()) != null) {
return ClassLoaderUtils.loadClass(classloader, fullyQualifiedName);
}
if (classLoaderRef != null && (classloader = classLoaderRef.get()) != null) {
return ClassLoaderUtils.loadClass(classloader, fullyQualifiedName);
}
if (previous == null) {
String modulePackageName = moduleInfo.getClass().getPackage().getName();
packageNameToClassLoader.putIfAbsent(modulePackageName,
if (previous == null) {
String modulePackageName = moduleInfo.getClass().getPackage().getName();
packageNameToClassLoader.putIfAbsent(modulePackageName,
ctxResolver.registerSource(toYangTextSource(identifier, moduleInfo));
for (YangModuleInfo importedInfo : moduleInfo.getImportedModules()) {
resolveModuleInfo(importedInfo);
ctxResolver.registerSource(toYangTextSource(identifier, moduleInfo));
for (YangModuleInfo importedInfo : moduleInfo.getImportedModules()) {
resolveModuleInfo(importedInfo);