alice.util.proxyGenerator.GeneratingJavaFileManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tuprolog Show documentation
Show all versions of tuprolog Show documentation
Light-weight Prolog system for Internet applications and infrastructures
The newest version!
package alice.util.proxyGenerator;
import javax.tools.*;
import java.io.*;
class GeneratingJavaFileManager extends ForwardingJavaFileManager {
private final GeneratedClassFile gcf;
public GeneratingJavaFileManager(StandardJavaFileManager sjfm, GeneratedClassFile gcf) {
super(sjfm);
this.gcf = gcf;
}
public JavaFileObject getJavaFileForOutput( Location location, String className, JavaFileObject.Kind kind,
FileObject sibling) throws IOException {
return gcf;
}
}
/*
This class forces the JavaCompiler to use the GeneratedClassFile's output stream for writing the class
*/