Esempio n. 1
0
 private void initContext() {
   context.put(JavacTaskImpl.class, this);
   if (context.get(TaskListener.class) != null)
     context.put(TaskListener.class, (TaskListener) null);
   if (taskListener != null) context.put(TaskListener.class, ccw.wrap(taskListener));
   // initialize compiler's default locale
   context.put(Locale.class, locale);
 }
Esempio n. 2
0
 /**
  * Construct a JavaFileObject from the given file.
  *
  * <p><b>TODO: this method is useless here</b>
  *
  * @param file a file
  * @return a JavaFileObject from the standard file manager.
  */
 public JavaFileObject asJavaFileObject(File file) {
   JavacFileManager fm = (JavacFileManager) context.get(JavaFileManager.class);
   return fm.getRegularFile(file);
 }