test_class.declarator: container1 = PackageId.fromString("container1")
test_class.modifier: private final
test_class.original_string: private final PackageId container1 = PackageId.fromString("container1");
test_class.type: PackageId
test_class.var_name: container1
test_class.declarator: cont1sub1 = PackageId.fromString("cont1sub1")
test_class.modifier: private final
test_class.original_string: private final PackageId cont1sub1 = PackageId.fromString("cont1sub1");
test_class.type: PackageId
test_class.var_name: cont1sub1
test_class.declarator: cont1emb1 = PackageId.fromString("cont1emb1")
test_class.modifier: private final
test_class.original_string: private final PackageId cont1emb1 = PackageId.fromString("cont1emb1");
test_class.type: PackageId
test_class.var_name: cont1emb1
test_class.declarator: installable1 = new EmbeddedPackageInstallable(container1, "", cont1emb1)
test_class.modifier: private final
test_class.original_string: private final EmbeddedPackageInstallable installable1 = new EmbeddedPackageInstallable(container1, "", cont1emb1);
test_class.type: EmbeddedPackageInstallable
test_class.var_name: installable1
test_class.declarator: container2 = PackageId.fromString("container2")
test_class.modifier: private final
test_class.original_string: private final PackageId container2 = PackageId.fromString("container2");
test_class.type: PackageId
test_class.var_name: container2
test_class.declarator: cont2sub1 = PackageId.fromString("cont2sub1")
test_class.modifier: private final
test_class.original_string: private final PackageId cont2sub1 = PackageId.fromString("cont2sub1");
test_class.type: PackageId
test_class.var_name: cont2sub1
test_class.declarator: cont2emb1 = PackageId.fromString("cont2emb1")
test_class.modifier: private final
test_class.original_string: private final PackageId cont2emb1 = PackageId.fromString("cont2emb1");
test_class.type: PackageId
test_class.var_name: cont2emb1
test_class.declarator: installable2 = new EmbeddedPackageInstallable(container2, "", cont2emb1)
test_class.modifier: private final
test_class.original_string: private final EmbeddedPackageInstallable installable2 = new EmbeddedPackageInstallable(container2, "", cont2emb1);
test_class.type: EmbeddedPackageInstallable
test_class.var_name: installable2
test_class.declarator: graph = new PackageGraph()
test_class.modifier: private final
test_class.original_string: private final PackageGraph graph = new PackageGraph();
test_class.type: PackageGraph
test_class.var_name: graph
test_class.declarator: scan1 = Stream.of(container1, cont1sub1, cont1emb1).collect(Collectors.toSet())
test_class.modifier: private final
test_class.original_string: private final Set<PackageId> scan1 = Stream.of(container1, cont1sub1, cont1emb1).collect(Collectors.toSet());
test_class.type: Set<PackageId>
test_class.var_name: scan1
test_class.declarator: scan2 = Stream.of(container2, cont2sub1, cont2emb1).collect(Collectors.toSet())
test_class.modifier: private final
test_class.original_string: private final Set<PackageId> scan2 = Stream.of(container2, cont2sub1, cont2emb1).collect(Collectors.toSet());
test_class.type: Set<PackageId>
test_class.var_name: scan2
test_class.file: core/src/test/java/net/adamcin/oakpal/core/checks/PackageGraphTest.java
test_class.identifier: PackageGraphTest
test_case.body: @Test
      public void testIdentifyPackage() {
          graph.startedScan();
          assertNull("expect last identified is null", graph.getLastIdentified());
          assertFalse("expect not identified " + container2, graph.isIdentified(container2));
          graph.identifyPackage(container2, null);
          assertTrue("expect identified " + container2, graph.isIdentified(container2));
          assertEquals("expect container2 is last identified",
                  container2, graph.getLastIdentified());
          assertFalse("expect not identified " + container1, graph.isIdentified(container1));
          graph.identifyPackage(container1, null);
          assertTrue("expect identified " + container1, graph.isIdentified(container1));
          assertEquals("expect container1 is last identified",
                  container1, graph.getLastIdentified());
      }
test_case.class_method_signature: PackageGraphTest.testIdentifyPackage()
test_case.full_signature: @Test public void testIdentifyPackage()
test_case.identifier: testIdentifyPackage
test_case.invocations: startedScan assertNull getLastIdentified assertFalse isIdentified identifyPackage assertTrue isIdentified assertEquals getLastIdentified assertFalse isIdentified identifyPackage assertTrue isIdentified assertEquals getLastIdentified
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIdentifyPackage()
focal_class.declarator: identified = new LinkedList<>()
focal_class.modifier: final
focal_class.original_string: final LinkedList<PackageId> identified = new LinkedList<>();
focal_class.type: LinkedList<PackageId>
focal_class.var_name: identified
focal_class.declarator: nodes = new HashMap<>()
focal_class.modifier: final
focal_class.original_string: final Map<PackageId, PackageGraphNode> nodes = new HashMap<>();
focal_class.type: Map<PackageId, PackageGraphNode>
focal_class.var_name: nodes
focal_class.file: core/src/main/java/net/adamcin/oakpal/core/checks/PackageGraph.java
focal_class.identifier: PackageGraph
focal_class.interfaces: implements ProgressCheck
focal_class.class_method_signature: PackageGraph.getOrCreateNode(final @NotNull PackageId packageId)
focal_class.full_signature: private PackageGraphNode getOrCreateNode(final @NotNull PackageId packageId)
focal_class.identifier: getOrCreateNode
focal_class.modifiers: private
focal_class.parameters: (final @NotNull PackageId packageId)
focal_class.return: PackageGraphNode
focal_class.signature: PackageGraphNode getOrCreateNode(final @NotNull PackageId packageId)
focal_class.class_method_signature: PackageGraph.getReportedViolations()
focal_class.full_signature: @Override public Collection<Violation> getReportedViolations()
focal_class.identifier: getReportedViolations
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<Violation>
focal_class.signature: Collection<Violation> getReportedViolations()
focal_class.class_method_signature: PackageGraph.startedScan()
focal_class.full_signature: @Override public void startedScan()
focal_class.identifier: startedScan
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startedScan()
focal_class.class_method_signature: PackageGraph.identifyPackage(final PackageId packageId, final File file)
focal_class.full_signature: @Override public void identifyPackage(final PackageId packageId, final File file)
focal_class.identifier: identifyPackage
focal_class.modifiers: @Override public
focal_class.parameters: (final PackageId packageId, final File file)
focal_class.return: void
focal_class.signature: void identifyPackage(final PackageId packageId, final File file)
focal_class.class_method_signature: PackageGraph.identifySubpackage(final PackageId packageId, final PackageId parentId)
focal_class.full_signature: @Override public void identifySubpackage(final PackageId packageId, final PackageId parentId)
focal_class.identifier: identifySubpackage
focal_class.modifiers: @Override public
focal_class.parameters: (final PackageId packageId, final PackageId parentId)
focal_class.return: void
focal_class.signature: void identifySubpackage(final PackageId packageId, final PackageId parentId)
focal_class.class_method_signature: PackageGraph.identifyEmbeddedPackage(final PackageId packageId, final PackageId parentId,
                                          final EmbeddedPackageInstallable slingInstallable)
focal_class.full_signature: @Override public void identifyEmbeddedPackage(final PackageId packageId, final PackageId parentId,
                                          final EmbeddedPackageInstallable slingInstallable)
focal_class.identifier: identifyEmbeddedPackage
focal_class.modifiers: @Override public
focal_class.parameters: (final PackageId packageId, final PackageId parentId,
                                          final EmbeddedPackageInstallable slingInstallable)
focal_class.return: void
focal_class.signature: void identifyEmbeddedPackage(final PackageId packageId, final PackageId parentId,
                                          final EmbeddedPackageInstallable slingInstallable)
focal_class.class_method_signature: PackageGraph.isIdentified(final @NotNull PackageId packageId)
focal_class.full_signature: public boolean isIdentified(final @NotNull PackageId packageId)
focal_class.identifier: isIdentified
focal_class.modifiers: public
focal_class.parameters: (final @NotNull PackageId packageId)
focal_class.return: boolean
focal_class.signature: boolean isIdentified(final @NotNull PackageId packageId)
focal_class.class_method_signature: PackageGraph.getLastIdentified()
focal_class.full_signature: public @Nullable PackageId getLastIdentified()
focal_class.identifier: getLastIdentified
focal_class.modifiers: public @Nullable
focal_class.parameters: ()
focal_class.return: PackageId
focal_class.signature: PackageId getLastIdentified()
focal_class.class_method_signature: PackageGraph.isRoot(final @NotNull PackageId packageId)
focal_class.full_signature: public boolean isRoot(final @NotNull PackageId packageId)
focal_class.identifier: isRoot
focal_class.modifiers: public
focal_class.parameters: (final @NotNull PackageId packageId)
focal_class.return: boolean
focal_class.signature: boolean isRoot(final @NotNull PackageId packageId)
focal_class.class_method_signature: PackageGraph.isLeftDescendantOfRight(final @NotNull PackageId left, final @NotNull PackageId right)
focal_class.full_signature: public boolean isLeftDescendantOfRight(final @NotNull PackageId left, final @NotNull PackageId right)
focal_class.identifier: isLeftDescendantOfRight
focal_class.modifiers: public
focal_class.parameters: (final @NotNull PackageId left, final @NotNull PackageId right)
focal_class.return: boolean
focal_class.signature: boolean isLeftDescendantOfRight(final @NotNull PackageId left, final @NotNull PackageId right)
focal_class.class_method_signature: PackageGraph.internalGetSelfAndAncestors(final @NotNull PackageId self)
focal_class.full_signature: private Stream<PackageId> internalGetSelfAndAncestors(final @NotNull PackageId self)
focal_class.identifier: internalGetSelfAndAncestors
focal_class.modifiers: private
focal_class.parameters: (final @NotNull PackageId self)
focal_class.return: Stream<PackageId>
focal_class.signature: Stream<PackageId> internalGetSelfAndAncestors(final @NotNull PackageId self)
focal_class.class_method_signature: PackageGraph.getSelfAndAncestors(final @NotNull PackageId self)
focal_class.full_signature: public Collection<PackageId> getSelfAndAncestors(final @NotNull PackageId self)
focal_class.identifier: getSelfAndAncestors
focal_class.modifiers: public
focal_class.parameters: (final @NotNull PackageId self)
focal_class.return: Collection<PackageId>
focal_class.signature: Collection<PackageId> getSelfAndAncestors(final @NotNull PackageId self)
focal_class.class_method_signature: PackageGraph.internalGetSelfAndDescendents(final @NotNull PackageId self)
focal_class.full_signature: private Stream<PackageId> internalGetSelfAndDescendents(final @NotNull PackageId self)
focal_class.identifier: internalGetSelfAndDescendents
focal_class.modifiers: private
focal_class.parameters: (final @NotNull PackageId self)
focal_class.return: Stream<PackageId>
focal_class.signature: Stream<PackageId> internalGetSelfAndDescendents(final @NotNull PackageId self)
focal_class.class_method_signature: PackageGraph.getSelfAndDescendants(final @NotNull PackageId self)
focal_class.full_signature: public Collection<PackageId> getSelfAndDescendants(final @NotNull PackageId self)
focal_class.identifier: getSelfAndDescendants
focal_class.modifiers: public
focal_class.parameters: (final @NotNull PackageId self)
focal_class.return: Collection<PackageId>
focal_class.signature: Collection<PackageId> getSelfAndDescendants(final @NotNull PackageId self)
focal_method.body: @Override
      public void identifyPackage(final PackageId packageId, final File file) {
          if (packageId != null) {
              identified.add(packageId);
              // set parent to null in case the package is first extracted as a nested package,
              // then scanned by itself explicitly
              getOrCreateNode(packageId).setParent(null);
          }
      }
focal_method.class_method_signature: PackageGraph.identifyPackage(final PackageId packageId, final File file)
focal_method.full_signature: @Override public void identifyPackage(final PackageId packageId, final File file)
focal_method.identifier: identifyPackage
focal_method.invocations: add setParent getOrCreateNode
focal_method.modifiers: @Override public
focal_method.parameters: (final PackageId packageId, final File file)
focal_method.return: void
focal_method.signature: void identifyPackage(final PackageId packageId, final File file)