( final String name )
| 190 | |
| 191 | // Move me to classpath/ClassManagerImpl??? |
| 192 | protected Class<?> loadSourceClass( final String name ) { |
| 193 | final String fileName = "/" + name.replace('.', '/') + ".java"; |
| 194 | final InputStream in = getResourceAsStream( fileName ); |
| 195 | if ( in == null ) { |
| 196 | return null; |
| 197 | } |
| 198 | try { |
| 199 | Interpreter.debug("Loading class from source file: " + fileName); |
| 200 | declaringInterpreter.eval( new InputStreamReader(in) ); |
| 201 | } catch ( EvalError e ) { |
| 202 | if (Interpreter.DEBUG) { |
| 203 | e.printStackTrace(); |
| 204 | } |
| 205 | } |
| 206 | try { |
| 207 | return plainClassForName( name ); |
| 208 | } catch ( final ClassNotFoundException e ) { |
| 209 | Interpreter.debug("Class not found in source file: " + name); |
| 210 | return null; |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | /** |
| 215 | Perform a plain Class.forName() or call the externally provided |
no test coverage detected