示例#1
0
 public String getName() {
   SkillName sn = this.getClass().getAnnotation(SkillName.class);
   if (sn != null) {
     return sn.value();
   }
   return null;
 }
示例#2
0
 public String getName(String locale) {
   SkillName sn = this.getClass().getAnnotation(SkillName.class);
   if (sn != null) {
     if (sn.translationNode().equalsIgnoreCase("")) {
       return sn.value();
     } else {
       String translatedName = Translation.getString(sn.translationNode(), locale);
       if (translatedName.equals(sn.translationNode())) {
         return sn.value();
       } else {
         return translatedName;
       }
     }
   }
   return null;
 }