test_class.file: app-dependency/src/test/java/com/kdgregory/pomutil/dependency/TestDependencyScanner.java
test_class.identifier: TestDependencyScanner
test_case.body: @Test
      public void testGetDependency() throws Exception
      {
          File pomFile = new File("../test-dependency/pom.xml");
          assertTrue("able to access POM", pomFile.exists());
  
          DependencyScanner scanner = new DependencyScanner(pomFile);
  
          assertEquals("compile-scope dependency",
                       "bcelx",
                       scanner.getDependency("com.kdgregory.bcelx.classfile.Annotation", Scope.COMPILE).artifactId);
  
          assertEquals("test-scope dependency",
                       "junit",
                       scanner.getDependency("org.junit.Test", Scope.TEST).artifactId);
  
          assertNull("transitive dependency",
                     scanner.getDependency("org.apache.bcel.classfile.ClassParser", Scope.TEST));
      }
test_case.class_method_signature: TestDependencyScanner.testGetDependency()
test_case.full_signature: @Test public void testGetDependency()
test_case.identifier: testGetDependency
test_case.invocations: assertTrue exists assertEquals getDependency assertEquals getDependency assertNull getDependency
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetDependency()
focal_class.declarator: logger = LoggerFactory.getLogger(getClass())
focal_class.modifier: private
focal_class.original_string: private Logger logger = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: repo
focal_class.modifier: private
focal_class.original_string: private LocalRepository repo;
focal_class.type: LocalRepository
focal_class.var_name: repo
focal_class.declarator: pom
focal_class.modifier: private
focal_class.original_string: private ResolvedPom pom;
focal_class.type: ResolvedPom
focal_class.var_name: pom
focal_class.declarator: dependencies = new TreeSet<Artifact>()
focal_class.modifier: private
focal_class.original_string: private Set<Artifact> dependencies = new TreeSet<Artifact>();
focal_class.type: Set<Artifact>
focal_class.var_name: dependencies
focal_class.declarator: dependencyLookup = new HashMap<String,Artifact>()
focal_class.modifier: private
focal_class.original_string: private Map<String,Artifact> dependencyLookup = new HashMap<String,Artifact>();
focal_class.type: Map<String,Artifact>
focal_class.var_name: dependencyLookup
focal_class.file: app-dependency/src/main/java/com/kdgregory/pomutil/dependency/DependencyScanner.java
focal_class.identifier: DependencyScanner
focal_class.class_method_signature: DependencyScanner.DependencyScanner(File pomFile)
focal_class.full_signature: public  DependencyScanner(File pomFile)
focal_class.identifier: DependencyScanner
focal_class.modifiers: public
focal_class.parameters: (File pomFile)
focal_class.signature:  DependencyScanner(File pomFile)
focal_class.class_method_signature: DependencyScanner.getDependencies()
focal_class.full_signature: public Collection<Artifact> getDependencies()
focal_class.identifier: getDependencies
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<Artifact>
focal_class.signature: Collection<Artifact> getDependencies()
focal_class.class_method_signature: DependencyScanner.getDependencies(Scope... scopes)
focal_class.full_signature: public Collection<Artifact> getDependencies(Scope... scopes)
focal_class.identifier: getDependencies
focal_class.modifiers: public
focal_class.parameters: (Scope... scopes)
focal_class.return: Collection<Artifact>
focal_class.signature: Collection<Artifact> getDependencies(Scope... scopes)
focal_class.class_method_signature: DependencyScanner.getDependency(String className, Scope scope)
focal_class.full_signature: public Artifact getDependency(String className, Scope scope)
focal_class.identifier: getDependency
focal_class.modifiers: public
focal_class.parameters: (String className, Scope scope)
focal_class.return: Artifact
focal_class.signature: Artifact getDependency(String className, Scope scope)
focal_class.class_method_signature: DependencyScanner.buildDependencyLookup()
focal_class.full_signature: private void buildDependencyLookup()
focal_class.identifier: buildDependencyLookup
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void buildDependencyLookup()
focal_method.body: public Artifact getDependency(String className, Scope scope)
      {
          Artifact dependency = dependencyLookup.get(className);
          if ((dependency == null) || (dependency.scope != scope))
              return null;
          return dependency;
      }
focal_method.class_method_signature: DependencyScanner.getDependency(String className, Scope scope)
focal_method.full_signature: public Artifact getDependency(String className, Scope scope)
focal_method.identifier: getDependency
focal_method.invocations: get
focal_method.modifiers: public
focal_method.parameters: (String className, Scope scope)
focal_method.return: Artifact
focal_method.signature: Artifact getDependency(String className, Scope scope)