/**
   * If no method tagged with {@link Title} annotation then will use Facets provided by {@link
   * FallbackFacetFactory} instead.
   */
  @Override
  public void process(final ProcessClassContext processClassContext) {
    final Class<?> cls = processClassContext.getCls();
    final FacetHolder facetHolder = processClassContext.getFacetHolder();

    final List<Method> methods =
        MethodFinderUtils.findMethodsWithAnnotation(cls, MethodScope.OBJECT, Title.class);

    Collections.sort(
        methods,
        new Comparator<Method>() {
          Comparator<String> comparator = new SequenceComparator();

          @Override
          public int compare(final Method o1, final Method o2) {
            final Title a1 = o1.getAnnotation(Title.class);
            final Title a2 = o2.getAnnotation(Title.class);
            return comparator.compare(a1.sequence(), a2.sequence());
          }
        });
    if (methods.isEmpty()) {
      return;
    }
    final List<TitleComponent> titleComponents =
        Lists.transform(methods, TitleComponent.FROM_METHOD);
    FacetUtil.addFacet(
        new TitleFacetViaTitleAnnotation(titleComponents, facetHolder, adapterManager));
  }
  @Override
  public void process(final ProcessMethodContext processMethodContext) {
    final Method getMethod = processMethodContext.getMethod();
    final String capitalizedName =
        StringExtensions.asJavaBaseNameStripAccessorPrefixIfRequired(getMethod.getName());

    final Class<?> cls = processMethodContext.getCls();
    final Method notInServiceMenuMethod =
        MethodFinderUtils.findMethod(
            cls,
            MethodScope.OBJECT,
            "notInServiceMenu" + capitalizedName,
            boolean.class,
            new Class[] {});
    if (notInServiceMenuMethod == null) {
      return;
    }

    processMethodContext.removeMethod(notInServiceMenuMethod);

    final FacetHolder facetedMethod = processMethodContext.getFacetHolder();
    FacetUtil.addFacet(new NotInServiceMenuFacetMethod(notInServiceMenuMethod, facetedMethod));
  }