private void createDeclaredViews(
      final Map<String, DesignDocument.View> views, final Class<?> klass) {
    eachAnnotation(
        klass,
        Views.class,
        new Predicate<Views>() {

          public boolean apply(Views input) {
            for (View v : input.value()) {
              addView(views, v, klass);
            }
            return true;
          }
        });

    ReflectionUtils.eachAnnotation(
        klass,
        View.class,
        new Predicate<View>() {

          public boolean apply(View input) {
            addView(views, input, klass);
            return true;
          }
        });
  }
 private String resolveTypeDiscriminatorForBackReference(Member m) {
   Method me =
       ReflectionUtils.findMethod(
           m.getDeclaringClass(), "get" + firstCharToUpperCase(m.getName()));
   if (me != null) {
     return resolveTypeDiscriminator(resolveReturnType(me));
   }
   return "";
 }