Exemplo n.º 1
0
 private String getPermission(Noun noun, Verb verb) {
   String nounPerm = noun.getClass().getAnnotation(PermissionName.class).value();
   String verbPerm = verb.getClass().getAnnotation(PermissionName.class).value();
   if (nounPerm == null || verbPerm == null)
     throw new IllegalArgumentException(
         "The arguments you supplied do not specify permission values!");
   return "core.permissions." + nounPerm + "." + verbPerm;
 }