code: private void registerLocalDirectives(Component annotation, MethodSpec.Builder initBuilder) {
      try {
        Class<?>[] componentsClass = annotation.directives();
  
        if (componentsClass.length > 0) {
          addGetDirectivesStatement(initBuilder);
        }
  
        Stream
            .of(componentsClass)
            .forEach(clazz -> initBuilder.addStatement("directives.set($S, new $T())",
                directiveToTagName(clazz.getName()),
                directiveOptionsName(clazz)));
      } catch (MirroredTypesException mte) {
        List<DeclaredType> classTypeMirrors = (List<DeclaredType>) mte.getTypeMirrors();
  
        if (!classTypeMirrors.isEmpty()) {
          addGetDirectivesStatement(initBuilder);
        }
  
        classTypeMirrors.forEach(classTypeMirror -> {
          TypeElement classTypeElement = (TypeElement) classTypeMirror.asElement();
          initBuilder.addStatement("directives.set($S, new $T())",
              directiveToTagName(classTypeElement.getSimpleName().toString()),
              directiveOptionsName(classTypeElement));
        });
      }
    }
docs: Register directives passed to the annotation.
  
  @param annotation The Component annotation on the Component we generate for
  @param initBuilder The builder for the init method