@Override protected boolean handleProcess( Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { for (Element el : roundEnv.getElementsAnnotatedWith(EventDoc.class)) { EventDoc event = el.getAnnotation(EventDoc.class); debug("Found event: " + event.module() + " " + event.code() + " " + event.desc()); addLine(getLine(event), getFilePath(event)); } return true; }
private String getFilePath(EventDoc doc) { return OUTPUT_DIR + doc.module() + DESC_FILE_SUFFIX; }
private String getLine(EventDoc event) { return event.module() + "-" + event.code() + "=" + event.desc(); }