@Override public synchronized void init(final ProcessingEnvironment processingEnv) { super.init(new RestrictingIncrementalProcessingEnvironment(processingEnv)); }
@Override public Set<String> getSupportedAnnotationTypes() { return FluentIterable.from(super.getSupportedAnnotationTypes()) .append(CustomImmutableAnnotations.annotations()) .toSet(); }
@Override public final boolean process(Set<? extends TypeElement> annotations, RoundEnvironment round) { try { StaticEnvironment.init(annotations, round, processingEnv); if (!round.processingOver() && !round.errorRaised()) { process(); } StaticEnvironment.shutdown(); } catch (Exception ex) { processingEnv.getMessager() .printMessage(Diagnostic.Kind.ERROR, getClass().getName() + " threw " + Throwables.getStackTraceAsString(ex)); } return false; } }