// Compile the compilation unit.
ClassFile[] cfs;
try {
cfs = compilationUnitToCompile.compile(this.iClassLoader, this.debuggingInformation);
} catch (Java.CompileException e) {
throw new TunnelException(e);
}
// Now that the CU is compiled, remove it from the set of uncompiled CUs.
this.uncompiledCompilationUnits.remove(compilationUnitToCompile);
// Get the generated class file.
for (int i = 0; i < cfs.length; ++i) {
if (cfs[i].getThisClassName().equals(name)) {
if (cf != null) throw new RuntimeException(); // SNO: Multiple CFs with the same name.
cf = cfs[i];
} else {
if (this.precompiledClasses.containsKey(cfs[i].getThisClassName())) throw new TunnelException(new Java.CompileException("Class or interface \"" + name + "\" is defined in more than one compilation unit", null));
this.precompiledClasses.put(cfs[i].getThisClassName(), cfs[i]);
}
}
if (cf == null) throw new RuntimeException(); // SNO: Compilation of CU does not generate CF with requested name.
}