public static void generateDirectives(GeneratorContext context, SourceWriter sw,
Class<?> clazz) {
// class of a directive
JClassType dType = context.getTypeOracle().findType(clazz.getName());
NgDirective ngDirective = dType.getAnnotation(NgDirective.class);
// a method annotated as directive
if (ngDirective != null ) {
sw.print("module.directive('" + ngDirective.value() + "',[ ");
generateSingleDirective(sw, dType,ngDirective);
sw.println("]);");
}
}