List<StdArrangementMatchRule> (@NotNull Element element, @Nullable final Set<? extends StdArrangementRuleAliasToken> aliases) { if (aliases != null && myMixin instanceof MutableMixin) { ((MutableMixin)myMixin).setMyRuleAliases(aliases); } final List<StdArrangementMatchRule> rules = new ArrayList<>(); for (Element ruleElement : element.getChildren(RULE_ELEMENT_NAME)) { Element matcherElement = ruleElement.getChild(MATCHER_ELEMENT_NAME); if (matcherElement == null) { continue; } StdArrangementEntryMatcher matcher = null; for (Element c : matcherElement.getChildren()) { matcher = myMatcherSerializer.deserialize(c); if (matcher != null) { break; } } if (matcher == null) { return new SmartList<>(); } Element orderTypeElement = ruleElement.getChild(ORDER_TYPE_ELEMENT_NAME); ArrangementSettingsToken orderType = null; if (orderTypeElement != null) { String orderTypeId = orderTypeElement.getText(); orderType = StdArrangementTokens.byId(orderTypeId); if (orderType == null) { orderType = myMixin.deserializeToken(orderTypeId); } if (orderType == null) { LOG.warn(String.format("Can't deserialize matching rule order type for id '%s'. Falling back to default (%s)", orderTypeId, ArrangementMatchRule.DEFAULT_ORDER_TYPE.getId())); } } if (orderType == null) { orderType = ArrangementMatchRule.DEFAULT_ORDER_TYPE; } rules.add(new StdArrangementMatchRule(matcher, orderType)); } return rules; }