JavaWriter writer = new JavaWriter(sourceFile.openWriter());
String packageName = getPackage(descriptor.name()).toString();
writer.emitPackage(packageName)
.emitImports("javax.annotation.Generated");
writer.emitImports("javax.inject.Inject");
if (!descriptor.providerNames().isEmpty()) {
writer.emitImports("javax.inject.Provider");
}
for (String implementingType : descriptor.implementingTypes()) {