Ejemplo n.º 1
0
 private Formatter getDefaultFormatter(Class<?> type) {
   Formatter formatter = defaultFormaters.get(type);
   if (formatter == null) {
     formatter = formatterFactory.createDefaultFormatter(type);
   }
   return formatter;
 }
Ejemplo n.º 2
0
 Formatter createFormatter(String name, List<String> args) {
   try {
     return formatterFactory.createFormatter(name, args);
   } catch (UnknownFormatterException e) {
     throw new InvalidExpressionException(ExpressionError.UNKNOWN_FORMATTER, e);
   } catch (FormatterInstantiationException e) {
     throw new InvalidExpressionException(ExpressionError.ILLEGALFORMATTER_DEFINITION, e);
   }
 }