private void scanUserPaths ( PackageSymbol p , boolean includeSourcePath ) throws IOException { Set < JavaFileObject . Kind > kinds = getPackageFileKinds ( ) ; Set < JavaFileObject . Kind > classKinds = EnumSet . copyOf ( kinds ) ; classKinds . remove ( JavaFileObject . Kind . SOURCE ) ; boolean wantClassFiles = ! classKinds . isEmpty ( ) ; Set < JavaFileObject . Kind > sourceKinds = EnumSet . copyOf ( kinds ) ; sourceKinds . remove ( JavaFileObject . Kind . CLASS ) ; boolean wantSourceFiles = ! sourceKinds . isEmpty ( ) ; boolean haveSourcePath = includeSourcePath && fileManager . hasLocation ( SOURCE_PATH ) ; if ( verbose && verbosePath ) { if ( fileManager instanceof StandardJavaFileManager ) { StandardJavaFileManager fm = ( StandardJavaFileManager ) fileManager ; if ( haveSourcePath && wantSourceFiles ) { List < Path > path = List . nil ( ) ; for ( Path sourcePath : fm . getLocationAsPaths ( SOURCE_PATH ) ) { path = path . prepend ( sourcePath ) ; } log . printVerbose ( "sourcepath" , path . reverse ( ) . toString ( ) ) ; } else if ( wantSourceFiles ) { List < Path > path = List . nil ( ) ; for ( Path classPath : fm . getLocationAsPaths ( CLASS_PATH ) ) { path = path . prepend ( classPath ) ; } log . printVerbose ( "sourcepath" , path . reverse ( ) . toString ( ) ) ; } if ( wantClassFiles ) { List < Path > path = List . nil ( ) ; for ( Path platformPath : fm . getLocationAsPaths ( PLATFORM_CLASS_PATH ) ) { path = path . prepend ( platformPath ) ; } for ( Path classPath : fm . getLocationAsPaths ( CLASS_PATH ) ) { path = path . prepend ( classPath ) ; } log . printVerbose ( "classpath" , path . reverse ( ) . toString ( ) ) ; } } } String packageName = p . fullname . toString ( ) ; if ( wantSourceFiles && ! haveSourcePath ) { fillIn ( p , CLASS_PATH , list ( CLASS_PATH , p , packageName , kinds ) ) ; } else { if ( wantClassFiles ) fillIn ( p , CLASS_PATH , list ( CLASS_PATH , p , packageName , classKinds ) ) ; if ( wantSourceFiles ) fillIn ( p , SOURCE_PATH , list ( SOURCE_PATH , p , packageName , sourceKinds ) ) ; } }
Scans class path and source path for files in given package .