X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fjava%2FJavaModule.java;h=aeec9a35be73a7485597060e07071c874db3d470;hp=cb39346e4a730483b2948e304c803d4805b9af20;hb=35e73f300e2101c436dcc23c9a0f9e12ecc81d59;hpb=dcca7344e1da6f975859fd79fbc6cead7d363042 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/java/JavaModule.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/java/JavaModule.java old mode 100755 new mode 100644 index cb39346e4..aeec9a35b --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/java/JavaModule.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/java/JavaModule.java @@ -23,7 +23,7 @@ import org.simantics.scl.compiler.types.kinds.Kinds; public class JavaModule extends ConcreteModule { - public static final JavaModule INSTANCE = new JavaModule(); + public static JavaModule INSTANCE = new JavaModule(); public static final String MODULE_NAME = "JavaBuiltin"; @@ -137,6 +137,8 @@ public class JavaModule extends ConcreteModule { "java/lang/Object", "hashCode", Types.NO_EFFECTS, Types.INTEGER, A)); addValue("toString", new JavaMethod(true, "java/lang/Object", "toString", Types.NO_EFFECTS, Types.STRING, A)); + + setParentClassLoader(getClass().getClassLoader()); } static Expression createLiteral(FunctionValue value) { @@ -145,6 +147,9 @@ public class JavaModule extends ConcreteModule { result = new EApplyType(result, var); return result; } - + + public static void flush() { + INSTANCE = new JavaModule(); + } }