use of org.robolectric.annotation.processing.validator.Validator in project robolectric by robolectric.
the class RobolectricProcessor method process.
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
for (TypeElement annotation : annotations) {
Validator validator = elementValidators.get(annotation);
if (validator != null) {
for (Element elem : roundEnv.getElementsAnnotatedWith(annotation)) {
validator.visit(elem, elem.getEnclosingElement());
}
}
}
if (!generated && shadowPackage != null) {
model.prepare();
for (Generator generator : generators) {
generator.generate(shadowPackage);
}
generated = true;
}
return true;
}
Aggregations