private void generateContentProviderIfRequested(final String packageName, final Set<? extends Element> entityAnnotated) throws Exception {
List<ContentProviderData> providers = new LinkedList<ContentProviderData>();
for (Element entity : entityAnnotated) {
Entity entityAnnotation = entity.getAnnotation(Entity.class);
if (entityAnnotation.contentProvider()) {
ContentProviderBuilder providerBuilder = new ContentProviderBuilder(packageName, entity, messager);
SourceContentProviderData providerData = providerBuilder.build();
JavaFileWriter javaFileWriter = new JavaFileWriter(packageName, providerData.getSimpleName(), processingEnv);
javaFileWriter.write(providerData.getSource());
providers.add(providerData);
}
}