KModuleCache.Builder _kmoduleCacheBuilder = createCacheBuilder();
CompilationData.Builder _compData = createCompilationData();
for ( KiePackage kPkg : kBuilder.getKnowledgePackages() ) {
PackageRegistry pkgRegistry = pkgRegistryMap.get( kPkg.getName() );
JavaDialectRuntimeData runtimeData = (JavaDialectRuntimeData) pkgRegistry.getDialectRuntimeRegistry().getDialectData( "java" );
List<String> types = new ArrayList<String>();
for ( FactType factType : kPkg.getFactTypes() ) {
Class< ? > typeClass = ((ClassDefinition) factType).getDefinedClass();
TypeDeclaration typeDeclaration = pkgRegistry.getPackage().getTypeDeclaration( typeClass );
if ( typeDeclaration != null ) {
typeInfos.put( typeClass.getName(), new TypeMetaInfo(typeDeclaration) );
}
String className = factType.getName();
String internalName = className.replace('.', '/') + ".class";
byte[] bytes = runtimeData.getBytecode(internalName);
trgMfs.write( internalName, bytes, true );
types.add( internalName );
}
Set<String> rules = rulesPerPackage.get( kPkg.getName() );