76 private ListBuffer<Env<AttrContext>> genList; |
76 private ListBuffer<Env<AttrContext>> genList; |
77 private TaskListener taskListener; |
77 private TaskListener taskListener; |
78 private AtomicBoolean used = new AtomicBoolean(); |
78 private AtomicBoolean used = new AtomicBoolean(); |
79 private Iterable<? extends Processor> processors; |
79 private Iterable<? extends Processor> processors; |
80 |
80 |
81 private Integer result = null; |
81 private Main.Result result = null; |
82 |
82 |
83 JavacTaskImpl(Main compilerMain, |
83 JavacTaskImpl(Main compilerMain, |
84 String[] args, |
84 String[] args, |
85 Context context, |
85 Context context, |
86 List<JavaFileObject> fileObjects) { |
86 List<JavaFileObject> fileObjects) { |
129 initContext(); |
129 initContext(); |
130 notYetEntered = new HashMap<JavaFileObject, JCCompilationUnit>(); |
130 notYetEntered = new HashMap<JavaFileObject, JCCompilationUnit>(); |
131 compilerMain.setAPIMode(true); |
131 compilerMain.setAPIMode(true); |
132 result = compilerMain.compile(args, context, fileObjects, processors); |
132 result = compilerMain.compile(args, context, fileObjects, processors); |
133 cleanup(); |
133 cleanup(); |
134 return result == 0; |
134 return result.isOK(); |
135 } else { |
135 } else { |
136 throw new IllegalStateException("multiple calls to method 'call'"); |
136 throw new IllegalStateException("multiple calls to method 'call'"); |
137 } |
137 } |
138 } |
138 } |
139 |
139 |