/*
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
*/
|
package com.megatim.fdxconsultation.core.ifaces.tools;
|
|
/**
|
*
|
* @author ASUS
|
*/
|
public class SourceCompiler {
|
|
// public static Class<?> compileAndLoad(UnitSourceGenerator unitSG, String binaryFilePath, String fullQualifiedName) throws ClassNotFoundException {
|
// ComponentContainer componentContainer = ComponentContainer.getInstance();
|
// JavaMemoryCompiler javaMemoryCompiler = componentContainer.getJavaMemoryCompiler();
|
//
|
// Config config = Compilation.Config.forUnitSourceGenerator(unitSG);
|
// config = config.storeCompiledClassesTo(binaryFilePath);
|
// ProducerTask<Compilation.Result> compilationTask = javaMemoryCompiler.compile(config);
|
// Compilation.Result compilationResult = compilationTask.join();
|
//
|
// ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
// ClassLoaders.addClassPaths(classLoader, compilationResult.getDependencies());
|
// ClassLoaders.addClassPath(classLoader, compilationResult.getClassPath().getAbsolutePath());
|
//
|
// return classLoader.loadClass(fullQualifiedName);
|
// }
|
|
}
|