Bug 3670 (part 3/5): Use of new statement parser in yang-maven-plugin
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / impl / util / YangSourceFromDependencyInfoResolver.java
index 9893c6cfd1a9c8f7a22b7db9fe11adf83f07006e..96dad452add6cf02630b9ca14885a75a4e918425 100644 (file)
@@ -3,23 +3,37 @@
  *
  * 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/eplv10.html
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 package org.opendaylight.yangtools.yang.parser.impl.util;
 
+import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableMap;
+import java.io.InputStream;
 import java.util.Map;
 import java.util.Map.Entry;
-
+import javax.annotation.concurrent.NotThreadSafe;
+import org.opendaylight.yangtools.yang.model.util.repo.AdvancedSchemaSourceProvider;
+import org.opendaylight.yangtools.yang.model.util.repo.SchemaSourceProvider;
 import org.opendaylight.yangtools.yang.model.util.repo.SourceIdentifier;
 
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableMap;
-
+/**
+ * Resolver for YANG Schema Source which is based on DependencyInfo
+ *
+ * This resolver does not use {@link SchemaSourceProvider} but supplied map
+ * of source identifiers and {@link YangModelDependencyInfo} to construct
+ * {@link YangSourceContext}.
+ *
+ */
+@Deprecated
+@NotThreadSafe
 public final class YangSourceFromDependencyInfoResolver extends YangSourceContextResolver {
 
     private final Map<SourceIdentifier, YangModelDependencyInfo> dependencyInfo;
 
-    public YangSourceFromDependencyInfoResolver(final Map<SourceIdentifier, YangModelDependencyInfo> moduleDependencies) {
+    public YangSourceFromDependencyInfoResolver(final Map<SourceIdentifier, YangModelDependencyInfo> moduleDependencies,
+                                                AdvancedSchemaSourceProvider<InputStream> sourceProvider) {
+        super(sourceProvider);
         dependencyInfo = ImmutableMap.copyOf(moduleDependencies);
     }