question: public void addClasspath ( List < File > classpath ) throws IOException { Validate . notNull ( classpath ) ; Validate . noNullElements ( classpath ) ; for ( File classpathElement : classpath ) { if ( classpathElement . isFile ( ) ) { addJar ( classpathElement ) ; } else if ( classpathElement . isDirectory ( ) ) { addDirectory ( classpathElement ) ; } else { throw new IllegalStateException ( ) ; } } }
target:  Add classes contained within a list of JAR files and folders. Note that if a duplicate class is encountered, the original is kept.