public static InheritanceTree createFromClassList(Collection<String> classNames) throws IllegalArgumentException {
  if (classNames == null || classNames.isEmpty()) {
    throw new IllegalArgumentException("No class name defined");
  }
  InheritanceTree inheritanceTree=new InheritanceTree();
  for (  String className : classNames) {
    if (className == null) {
      throw new IllegalArgumentException("Null class name");
    }
    analyzeClassName(inheritanceTree,className);
  }
  Set<String> classes=new HashSet<>(inheritanceTree.getAllClasses());
  for (  String className : classes) {
    if (!classNames.contains(className))     inheritanceTree.removeClass(className);
  }
  return inheritanceTree;
}

public static InheritanceTree createFromClassList ( Collection < String > classNames ) throws IllegalArgumentException { if ( classNames == null || classNames . isEmpty ( ) ) { throw new IllegalArgumentException ( "No class name defined" ) ; } InheritanceTree inheritanceTree = new InheritanceTree ( ) ; for ( String className : classNames ) { if ( className == null ) { throw new IllegalArgumentException ( "Null class name" ) ; } analyzeClassName ( inheritanceTree , className ) ; } Set < String > classes = new HashSet < > ( inheritanceTree . getAllClasses ( ) ) ; for ( String className : classes ) { if ( ! classNames . contains ( className ) ) inheritanceTree . removeClass ( className ) ; } return inheritanceTree ; }
create inheritance tree only for the classes passed as parameter < p > private classes will be ignored
