import org.simantics.scl.compiler.environment.GlobalOnlyEnvironment;
import org.simantics.scl.compiler.internal.codegen.types.JavaTypeTranslator;
import org.simantics.scl.compiler.internal.codegen.utils.JavaNamingPolicy;
import org.simantics.scl.compiler.environment.GlobalOnlyEnvironment;
import org.simantics.scl.compiler.internal.codegen.types.JavaTypeTranslator;
import org.simantics.scl.compiler.internal.codegen.utils.JavaNamingPolicy;
import org.simantics.scl.compiler.internal.codegen.utils.TransientClassBuilder;
import org.simantics.scl.compiler.internal.decompilation.DecompilerFactory;
import org.simantics.scl.compiler.internal.decompilation.IDecompiler;
import org.simantics.scl.compiler.internal.codegen.utils.TransientClassBuilder;
import org.simantics.scl.compiler.internal.decompilation.DecompilerFactory;
import org.simantics.scl.compiler.internal.decompilation.IDecompiler;
public synchronized void addClasses(Map<String, byte[]> classes) {
if(TRACE_CLASS_CREATION)
for(String name : classes.keySet())
public synchronized void addClasses(Map<String, byte[]> classes) {
if(TRACE_CLASS_CREATION)
for(String name : classes.keySet())
/*if(!name.startsWith(SCL_PACKAGE_PREFIX) || !extractClassLoaderId(name).equals(moduleName))
throw new IllegalArgumentException("Class name " + name + " does not start with '" +
SCL_PACKAGE_PREFIX + moduleName + "$'.");
/*if(!name.startsWith(SCL_PACKAGE_PREFIX) || !extractClassLoaderId(name).equals(moduleName))
throw new IllegalArgumentException("Class name " + name + " does not start with '" +
SCL_PACKAGE_PREFIX + moduleName + "$'.");
// If the class is not generated from SCL, use parent class loader
if(!name.startsWith(SCL_PACKAGE_PREFIX)) {
// If the class is not generated from SCL, use parent class loader
if(!name.startsWith(SCL_PACKAGE_PREFIX)) {
- decompiler.decompile(this, className, new OutputStreamWriter(System.out));
+ decompiler.decompile(this, className, new OutputStreamWriter(new LoggingOutputStream(LOGGER, LogLevel.INFO)));