private void buildClassPath ( ) throws InterruptedException , IOException , CheckedAnalysisException { IClassPathBuilder builder = classFactory . createClassPathBuilder ( bugReporter ) ; { HashSet < String > seen = new HashSet <> ( ) ; for ( String path : project . getFileArray ( ) ) { if ( seen . add ( path ) ) { builder . addCodeBase ( classFactory . createFilesystemCodeBaseLocator ( path ) , true ) ; } } for ( String path : project . getAuxClasspathEntryList ( ) ) { if ( seen . add ( path ) ) { builder . addCodeBase ( classFactory . createFilesystemCodeBaseLocator ( path ) , false ) ; } } } builder . scanNestedArchives ( analysisOptions . scanNestedArchives ) ; builder . build ( classPath , progressReporter ) ; appClassList = builder . getAppClassList ( ) ; if ( PROGRESS ) { System . out . println ( appClassList . size ( ) + " classes scanned" ) ; } // If any of the application codebases contain source code, // add them to the source path. // Also, use the last modified time of application codebases // to set the project timestamp. List < String > pathNames = new ArrayList <> ( ) ; for ( Iterator < ? extends ICodeBase > i = classPath . appCodeBaseIterator ( ) ; i . hasNext ( ) ; ) { ICodeBase appCodeBase = i . next ( ) ; if ( appCodeBase . containsSourceFiles ( ) ) { String pathName = appCodeBase . getPathName ( ) ; if ( pathName != null ) { pathNames . add ( pathName ) ; } } project . addTimestamp ( appCodeBase . getLastModifiedTime ( ) ) ; } project . addSourceDirs ( pathNames ) ; }
Build the classpath from project codebases and system codebases .