}
sw.println("var module = $wnd.angular.module('" + modName + "', []);");
if (deps != null) {
int i = 0;
for (Class<?> clazz : deps.value()) {
NgInject ngInject = clazz.getAnnotation(NgInject.class);
final String compInstance = "args[" + i++ + "]";
// automatically adding inject based on classname to filters that are not annotated
if (Filter.class.isAssignableFrom(clazz)) {
FilterGenerator.generateFilter(context,sw,clazz,ngInject,compInstance);
} else if (ngInject != null) {
// is an injectible
if (AngularController.class.isAssignableFrom(clazz)) {
// is a controller
sw.println(compInstance
+ ".@"
+ AngularController.class.getName()
+ "::register"
+ "(Lcom/google/gwt/core/client/JavaScriptObject;)(module);");
} else {
// is a service
sw.println("module.factory('" + ngInject.name()
+ "', function() {");
sw.indent();
JClassType serviceType = context.getTypeOracle().findType(clazz.getName());
generateService(sw, compInstance,serviceType);
sw.outdent();