@Override @Nullable public Invokable invoke(Invokation invokation, Object... parameters) { String message = CharMatcher.WHITESPACE.trimFrom(parameters[0].toString()); StaticEnvironment.processing().getMessager().printMessage(Diagnostic.Kind.ERROR, message); return null; }
@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; }
protected final Set<TypeElement> annotations() { return StaticEnvironment.annotations(); }
protected final RoundEnvironment round() { return StaticEnvironment.round(); }
protected final ProcessingEnvironment processing() { return StaticEnvironment.processing(); }
private static Files getFiles() { return StaticEnvironment.getInstance(Files.class, FilesSupplier.INSTANCE); }
private static Messager getMessager() { return StaticEnvironment.processing().getMessager(); }
private static Filer getFiler() { return StaticEnvironment.processing().getFiler(); }