Set<String> modifiedPackages = new HashSet<String>();
if (!modifiedClasses.isEmpty()) {
ClassLoader rootClassLoader = pkgbuilder.getRootClassLoader();
if ( rootClassLoader instanceof ProjectClassLoader ) {
ProjectClassLoader projectClassLoader = (ProjectClassLoader) rootClassLoader;
projectClassLoader.reinitTypes();
for (String resourceName : modifiedClasses) {
String className = convertResourceToClassName( resourceName );
byte[] bytes = newKM.getBytes(resourceName);
Class<?> clazz = projectClassLoader.defineClass(className, resourceName, bytes);
modifiedPackages.add(clazz.getPackage().getName());