@ Override protected ClassEntry getClassEntry ( String name , String pathName ) throws ClassNotFoundException { PathImpl classFile = _classDir . lookup ( pathName ) ; /* Path classDir = classFile.getParent(); if (! classDir.isDirectory()) return null; */ String javaName = name . replace ( ' ' , ' ' ) + _sourceExt ; PathImpl javaFile = _sourceDir . lookup ( javaName ) ; for ( int i = 0 ; i < INNER_CLASS_SEPARATORS . length ; i ++ ) { char sep = INNER_CLASS_SEPARATORS [ i ] ; if ( name . indexOf ( sep ) > 0 ) { String subName = name . substring ( 0 , name . indexOf ( sep ) ) ; String subJavaName = subName . replace ( ' ' , ' ' ) + _sourceExt ; PathImpl subJava = _sourceDir . lookup ( subJavaName ) ; if ( subJava . exists ( ) ) { javaFile = subJava ; } } } synchronized ( this ) { if ( _requireSource && ! javaFile . exists ( ) ) { boolean doRemove = true ; if ( doRemove ) { log . finer ( L . l ( "removing obsolete class `{0}'." , classFile . getPath ( ) ) ) ; try { classFile . remove ( ) ; } catch ( IOException e ) { log . log ( Level . WARNING , e . toString ( ) , e ) ; } return null ; } } if ( ! classFile . canRead ( ) && ! javaFile . canRead ( ) ) return null ; return new CompilingClassEntry ( this , getClassLoader ( ) , name , javaFile , classFile , getCodeSource ( classFile ) ) ; } }
Loads the specified class compiling if necessary .