public OnTheFlyJavaCompiler2(final ClassLoader scope, final JavaVersion version) { InMemoryJavaCompiler _inMemoryJavaCompiler = new InMemoryJavaCompiler(scope, version); this.inMemoryCompiler = _inMemoryJavaCompiler; this.javaVersion = version; }
/** * @since 2.11 */ public long setJavaVersion(final JavaVersion javaVersion) { long _xblockexpression = (long) 0; { final long classFmt = this.toClassFmt(javaVersion); this.setSourceLevel(classFmt); this.setComplianceLevel(classFmt); _xblockexpression = this.compilerOptions.targetJDK = classFmt; } return _xblockexpression; }
/** * @since 2.11 */ public void setJavaVersion(final JavaVersion version) { this.inMemoryCompiler.setJavaVersion(version); this.javaVersion = version; }
return new JavaSource(_javaFile, _value); }; final InMemoryJavaCompiler.Result result = this.inMemoryCompiler.compile(((JavaSource[])Conversions.unwrapArray(IterableExtensions.<Map.Entry<String, String>, JavaSource>map(sources.entrySet(), _function), JavaSource.class))); try { final Function1<CategorizedProblem, Boolean> _function_1 = (CategorizedProblem it) -> {
public Class<?> compileToClass(final String classname, final String code) { String _javaFile = this.toJavaFile(classname); JavaSource _javaSource = new JavaSource(_javaFile, code); final InMemoryJavaCompiler.Result result = this.inMemoryCompiler.compile(_javaSource); try { final Function1<CategorizedProblem, Boolean> _function = (CategorizedProblem it) -> {
public InMemoryJavaCompiler(final ClassLoader parent, final JavaVersion javaVersion) { InMemoryJavaCompiler.ClassLoaderBasedNameEnvironment _classLoaderBasedNameEnvironment = new InMemoryJavaCompiler.ClassLoaderBasedNameEnvironment(parent); this.nameEnv = _classLoaderBasedNameEnvironment; this.parentClassLoader = parent; CompilerOptions _compilerOptions = new CompilerOptions(); this.compilerOptions = _compilerOptions; this.setJavaVersion(javaVersion); this.compilerOptions.inlineJsrBytecode = true; this.compilerOptions.preserveAllLocalVariables = true; }