long totalBytecodeSize = 0;
Map<String, ClassNode> classesToMerge = Maps.newHashMap();
for(byte[] clazz : implementationClasses) {
totalBytecodeSize += clazz.length;
ClassNode node = getClassNodeFromByteCode(clazz);
classesToMerge.put(node.name, node);
}
LinkedList<ClassSet> names = Lists.newLinkedList();
Set<ClassSet> namesCompleted = Sets.newHashSet();
names.add(set);
while ( !names.isEmpty() ) {
final ClassSet nextSet = names.removeFirst();
if (namesCompleted.contains(nextSet)) continue;
final ClassNames nextPrecompiled = nextSet.precompiled;
final byte[] precompiledBytes = byteCodeLoader.getClassByteCodeFromPath(nextPrecompiled.clazz);
ClassNames nextGenerated = nextSet.generated;
ClassNode generatedNode = classesToMerge.get(nextGenerated.slash);
MergedClassResult result = MergeAdapter.getMergedClass(nextSet, precompiledBytes, generatedNode);
for(String s : result.innerClasses) {
s = s.replace(FileUtils.separatorChar, '.');
names.add(nextSet.getChild(s));