code: public <D extends Directive> AbstractModule directive(Class<D> klass) {
          String className = Strings.simpleName(klass);
          String name = Strings.decapitalize(className);
          JSFunction<NGDirective> directiveFactory = JSFunction.create(new DefaultDirectiveFactory<D>(name, klass));
          DirectiveDependencyInspector inspector = GWT.create(DirectiveDependencyInspector.class);
          JSArray<String> dependencies = JSArray.create(inspector.inspect(klass));
          ngo.directive(name, dependencies, directiveFactory);
          return this;
      }
docs: Registers a Directive type with the module. The name of the component is
  derived from the class name, e.g.
  <pre>
  // Derived name is "myDirective". Java package is omitted.
  // Attribute directive usage is {@code <div data-my-directive> }
  // Class directive usage is {@code <div class="my-directive"> }
  // Element directive usage is {@code <my-directive> }
  directive(com.example.MyDirective.class);
  </pre>
  
  @param Directive type.