Slide 56
Slide 56 text
public boolean process(Set<> annotations, RoundEnvironment rv) {
for (Element annotatedElement : rv.getElementsAnnotatedWith(Factory.class)) {
if (annotatedElement.getKind() != ElementKind.CLASS) {
error( annotatedElement, "Only classes can be annotated with @Factory");
}
}
}
public void error(Element e, String msg) {
messager.printMessage(Diagnostic.Kind.ERROR, "Error", e);
}