private void handleBeanFactoryElement(Element element) {
List<? extends AnnotationMirror> annotationMirrors = element.getAnnotationMirrors();
for (AnnotationMirror mirror : annotationMirrors) {
final String annotationType = mirror.getAnnotationType().toString();
if (annotationType.equals(BeanFactoryExtension.class.getName())) {
PackageElement packageElement = processingEnv.getElementUtils().getPackageOf(element);
String fqn = packageElement.getQualifiedName().toString() + "." +
element.getSimpleName().toString();
System.out.println("Factory: " + fqn);
discoveredBeanFactories.add(fqn);
} else if (annotationType.equals("com.google.web.bindery.autobean.shared.AutoBeanFactory.Category")) {
final Collection<? extends AnnotationValue> values = mirror.getElementValues().values();