code: private static List<DependencyError> checkForbiddenSection(final Dependencies dependencies, final Package<NotDependsOn> forbiddenPkg,
              final ClassInfo classInfo) {
  
          final List<DependencyError> errors = new ArrayList<DependencyError>();
  
          final Iterator<String> it = classInfo.getImports().iterator();
          while (it.hasNext()) {
              final String importedPkg = it.next();
              if (!importedPkg.equals(classInfo.getPackageName())) {
                  final NotDependsOn ndo = Utils.findForbiddenByName(dependencies.getAlwaysForbidden(), importedPkg);
                  if (ndo != null) {
                      errors.add(new DependencyError(classInfo.getName(), importedPkg, ndo.getComment()));
                  } else {
                      final NotDependsOn dep = Utils.findForbiddenByName(forbiddenPkg.getDependencies(), importedPkg);
                      if (dep != null) {
                          final String comment;
                          if (dep.getComment() == null) {
                              comment = forbiddenPkg.getComment();
                          } else {
                              comment = dep.getComment();
                          }
                          errors.add(new DependencyError(classInfo.getName(), importedPkg, comment));
                      }
                  }
              }
          }
          return errors;
      }
docs: Checks the dependencies for a package from the "forbidden" section.
  
  @param dependencies
  Dependency definition to use.
  @param forbiddenPkg
  Package with forbidden imports.
  @param classInfo
  Information extracted from the class.
  
  @return List of errors - may be empty but is never <code>null</code>.