Пример #1
0
 @Override
 public V fromASTNode(CommonTree treeNode) throws ReadingException {
   Map<String, Entry<Object, CommonTree>> attrs = keyValueMapTranslator.fromASTNode(treeNode);
   if (areMandatoryPresent(attrs)) {
     return createSD(attrs, treeNode);
   } else {
     throw new ReadingException(
         i18n(
             "ERR_TRANSLATE_MISSING_ELEMENTS",
             keyValueMapTranslator.typedValueTranslators.keySet()),
         treeNode);
   }
 }
Пример #2
0
 <T> void addDefaultAttribute(ElementTranslator<T> valueTranslator) {
   keyValueMapTranslator.defaultValueTranslator = valueTranslator;
 }