Package org.grouplens.common.dto.Dto

Examples of org.grouplens.common.dto.Dto.Named.plural()


       
        @Override
        public String translateName(Field f) {
            Named n = f.getAnnotation(Named.class);
            if (n != null) {
                return (f.getType().isArray() ? n.plural() : n.singular());
            } else
                return f.getName();
        }
    }
}
View Full Code Here


  }

  private static String translateFieldName(Field f) {
    Named named = f.getAnnotation(Named.class);
    if (named != null) {
      return f.getType().isArray() ? named.plural() : named.singular();
    } else {
      return f.getName();
    }
  }
View Full Code Here

  }

  private static String getDtoPluralName(Class<? extends Dto> type) {
    Named name = type.getAnnotation(Named.class);
    if (name != null) {
      return name.plural();
    } else {
      // Dto default names always assumed to be singular
      return getDtoSingularName(type) + "s";
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.