class ClassReaderFactory implements JavaClassReaderFactory {
public JavaClassReader getClassReader(final String className)
throws IOException {
final byte[] bytes = classRepository.getCompiledClass(className);
if (bytes != null) {
return new JavaClassReader() {
public String getClassName() {
return className;
}
public InputStream getInputStream() {
return new ByteArrayInputStream(bytes);
}
};
}
String classFile = className.replace('.', '/') + ".class";
final InputStream is = getResourceAsStream(classFile);
if (is != null) {
return new JavaClassReader() {
public String getClassName() {
return className;
}
public InputStream getInputStream() {