code: private <P extends MavenDependentDescriptor, D extends AbstractDependencyDescriptor> List<MavenDependencyDescriptor> getDependencies(P dependent,
              List<Dependency> dependencies, Class<D> dependsOnType, ScannerContext scannerContext) {
          Store store = scannerContext.getStore();
          List<MavenDependencyDescriptor> dependencyDescriptors = new ArrayList<>(dependencies.size());
          for (Dependency dependency : dependencies) {
              MavenArtifactDescriptor dependencyArtifactDescriptor = getMavenArtifactDescriptor(dependency, scannerContext);
              // Deprecated graph structure
              D dependsOnDescriptor = store.create(dependent, dependsOnType, dependencyArtifactDescriptor);
              dependsOnDescriptor.setOptional(dependency.isOptional());
              dependsOnDescriptor.setScope(dependency.getScope());
              // New graph structure supporting exclusions
              MavenDependencyDescriptor dependencyDescriptor = store.create(MavenDependencyDescriptor.class);
              dependencyDescriptor.setToArtifact(dependencyArtifactDescriptor);
              dependencyDescriptor.setOptional(dependency.isOptional());
              dependencyDescriptor.setScope(dependency.getScope());
              for (Exclusion exclusion : dependency.getExclusions()) {
                  MavenExcludesDescriptor mavenExcludesDescriptor = store.create(MavenExcludesDescriptor.class);
                  mavenExcludesDescriptor.setGroupId(exclusion.getGroupId());
                  mavenExcludesDescriptor.setArtifactId(exclusion.getArtifactId());
                  dependencyDescriptor.getExclusions().add(mavenExcludesDescriptor);
              }
              dependencyDescriptors.add(dependencyDescriptor);
          }
          return dependencyDescriptors;
      }
docs: Adds information about artifact dependencies.
  
  @param dependent
  The dependent to add artifacts as dependencies
  @param dependencies
  The dependencies information.
  @param dependsOnType
  The type for creating the
  {@link com.buschmais.jqassistant.plugin.common.api.model.DependsOnDescriptor}.
  @param scannerContext
  The scanner context
  @return The list of {@link MavenDependencyDescriptor}s.