code: private Set<PackageRef> collectDependencies(Analyzer analyzer) throws Exception {
  		// collect all classed directly exported by the bnd.bnd file
  		Map <TypeRef, Clazz> classSpace = analyzer.getClassspace();
  		Set<TypeRef> knownTypeRefs = classSpace.keySet();
  		if (allReferencedTypes.isEmpty())
  			allReferencedTypes.addAll(knownTypeRefs);
  	
  		// go through the known classes and find their unknown dependencies
  		for (TypeRef typeRef : knownTypeRefs) {
  			if (!allReferencedTypes.contains(typeRef))			// unused class in the referenced package
  				continue;
  			// collect the imports from a class and add them to newReferencedTypes
  			Clazz classInstance = classSpace.get(typeRef);
  			collectClassDependencies(classInstance, analyzer);
  		}
  		// collect the newly added packages by going through the referenced classes
  		return collectPackageDependencies();
  	}
docs: for each class in classSpace, use addDirectReferences() to add imported classes to allReferencedTypes
  add the packages imported to the analyzer and run another analysis
  Only search the directly referenced classes on the class in the allReferencedTypes
  
  @param analyzer
  @return
  @throws Exception