com.sun.tools.sjavac.comp.SmartFileManager Java Examples
The following examples show how to use
com.sun.tools.sjavac.comp.SmartFileManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PubApiExtractor.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Setup a compilation context, used for reading public apis of classes on the classpath * as well as annotation processors. */ public PubApiExtractor(Options options) { JavacTool compiler = com.sun.tools.javac.api.JavacTool.create(); fileManager = new SmartFileManager(compiler.getStandardFileManager(null, null, null)); context = new com.sun.tools.javac.util.Context(); String[] args = options.prepJavacArgs(); task = compiler.getTask(new PrintWriter(System.err), fileManager, null, Arrays.asList(args), null, null, context); // Trigger a creation of the JavaCompiler, necessary to get a sourceCompleter for ClassFinder. // The sourceCompleter is used for build situations where a classpath class references other classes // that happens to be on the sourcepath. JavaCompiler.instance(context); // context.put(JavaFileManager.class, fileManager); }
Example #2
Source File: CompilerThread.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Prepare the compiler thread for use. It is not yet started. * It will be started by the executor service. */ public synchronized void use() { assert(!inUse); inUse = true; compiler = com.sun.tools.javac.api.JavacTool.create(); fileManager = compiler.getStandardFileManager(null, null, null); fileManagerBase = (BaseFileManager)fileManager; smartFileManager = new SmartFileManager(fileManager); context = new Context(); context.put(JavaFileManager.class, smartFileManager); ResolveWithDeps.preRegister(context); JavaCompilerWithDeps.preRegister(context, this); subTasks = new ArrayList<Future<?>>(); }
Example #3
Source File: CompilerThread.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Prepare the compiler thread for use. It is not yet started. * It will be started by the executor service. */ public synchronized void use() { assert(!inUse); inUse = true; compiler = com.sun.tools.javac.api.JavacTool.create(); fileManager = compiler.getStandardFileManager(null, null, null); fileManagerBase = (BaseFileManager)fileManager; smartFileManager = new SmartFileManager(fileManager); context = new Context(); context.put(JavaFileManager.class, smartFileManager); ResolveWithDeps.preRegister(context); JavaCompilerWithDeps.preRegister(context, this); subTasks = new ArrayList<Future<?>>(); }
Example #4
Source File: CompilerThread.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Prepare the compiler thread for use. It is not yet started. * It will be started by the executor service. */ public synchronized void use() { assert(!inUse); inUse = true; compiler = com.sun.tools.javac.api.JavacTool.create(); fileManager = compiler.getStandardFileManager(null, null, null); fileManagerBase = (BaseFileManager)fileManager; smartFileManager = new SmartFileManager(fileManager); context = new Context(); context.put(JavaFileManager.class, smartFileManager); ResolveWithDeps.preRegister(context); JavaCompilerWithDeps.preRegister(context, this); subTasks = new ArrayList<Future<?>>(); }
Example #5
Source File: CompilerThread.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Prepare the compiler thread for use. It is not yet started. * It will be started by the executor service. */ public synchronized void use() { assert(!inUse); inUse = true; compiler = com.sun.tools.javac.api.JavacTool.create(); fileManager = compiler.getStandardFileManager(null, null, null); fileManagerBase = (BaseFileManager)fileManager; smartFileManager = new SmartFileManager(fileManager); context = new Context(); context.put(JavaFileManager.class, smartFileManager); ResolveWithDeps.preRegister(context); JavaCompilerWithDeps.preRegister(context, this); subTasks = new ArrayList<Future<?>>(); }
Example #6
Source File: CompilerThread.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Prepare the compiler thread for use. It is not yet started. * It will be started by the executor service. */ public synchronized void use() { assert(!inUse); inUse = true; compiler = com.sun.tools.javac.api.JavacTool.create(); fileManager = compiler.getStandardFileManager(null, null, null); fileManagerBase = (BaseFileManager)fileManager; smartFileManager = new SmartFileManager(fileManager); context = new Context(); context.put(JavaFileManager.class, smartFileManager); ResolveWithDeps.preRegister(context); JavaCompilerWithDeps.preRegister(context, this); subTasks = new ArrayList<Future<?>>(); }
Example #7
Source File: CompilerThread.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Prepare the compiler thread for use. It is not yet started. * It will be started by the executor service. */ public synchronized void use() { assert(!inUse); inUse = true; compiler = com.sun.tools.javac.api.JavacTool.create(); fileManager = compiler.getStandardFileManager(null, null, null); fileManagerBase = (BaseFileManager)fileManager; smartFileManager = new SmartFileManager(fileManager); context = new Context(); context.put(JavaFileManager.class, smartFileManager); ResolveWithDeps.preRegister(context); JavaCompilerWithDeps.preRegister(context, this); subTasks = new ArrayList<Future<?>>(); }
Example #8
Source File: CompilerThread.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Prepare the compiler thread for use. It is not yet started. * It will be started by the executor service. */ public synchronized void use() { assert(!inUse); inUse = true; compiler = com.sun.tools.javac.api.JavacTool.create(); fileManager = compiler.getStandardFileManager(null, null, null); fileManagerBase = (BaseFileManager)fileManager; smartFileManager = new SmartFileManager(fileManager); context = new Context(); context.put(JavaFileManager.class, smartFileManager); ResolveWithDeps.preRegister(context); JavaCompilerWithDeps.preRegister(context, this); subTasks = new ArrayList<Future<?>>(); }