public void close() throws IOException
        {
            super.close();
            final String actingPackageName = packageNameOverride == null ? packageName : packageNameOverride;
            packageNameOverride = null;

            final String qualifiedName = actingPackageName + "." + name;
            final InMemoryJavaFileObject sourceFile =
                new InMemoryJavaFileObject(qualifiedName, getBuffer().toString());

            final InMemoryJavaFileObject existingFile = sourceFiles.putIfAbsent(qualifiedName, sourceFile);

            if (existingFile != null && !Objects.equals(existingFile.sourceCode, sourceFile.sourceCode))
            {
                throw new IllegalStateException("Duplicate (but different) class: " + qualifiedName);
            }
        }
Compile the generated sources and return a {@link URLClassLoader} that can be used to load the generated classes.

@return a {@link URLClassLoader} that can be used to load the generated classes
sbe-tool/src/propertyTest/java/uk/co/real_logic/sbe/properties/utils/InMemoryOutputManager.java