use of org.glassfish.api.I18n in project Payara by payara.
the class CommandModelImpl method init.
public static Map<String, ParamModel> init(Class commandType, I18n i18n, LocalStringManager localStrings) {
Class currentClazz = commandType;
Map<String, ParamModel> results = new LinkedHashMap<String, ParamModel>();
while (currentClazz != null) {
for (Field f : currentClazz.getDeclaredFields()) {
I18n fieldI18n = f.getAnnotation(I18n.class);
if (fieldI18n != null) {
localStrings = new LocalStringManagerImpl(commandType);
}
add(results, f, i18n, localStrings);
}
for (Method m : currentClazz.getDeclaredMethods()) {
I18n fieldI18n = m.getAnnotation(I18n.class);
if (fieldI18n != null) {
localStrings = new LocalStringManagerImpl(commandType);
}
add(results, m, i18n, localStrings);
}
currentClazz = currentClazz.getSuperclass();
}
return results;
}
Aggregations