public RutaRuleElement createRuleElement(IRutaExpression expression,
RuleElementQuantifier quantifier, List<AbstractRutaCondition> conditions,
List<AbstractRutaAction> actions, RuleElementContainer container, RutaBlock parent) {
RutaMatcher matcher = null;
if (expression instanceof MatchReference) {
matcher = new RutaTypeMatcher((MatchReference) expression);
} else if (expression instanceof TypeExpression) {
// e.g., for functions
MatchReference matchReference = new MatchReference((TypeExpression) expression);
matcher = new RutaTypeMatcher(matchReference);
} else if (expression instanceof IStringExpression) {
matcher = new RutaLiteralMatcher((IStringExpression) expression);
}
return new RutaRuleElement(matcher, quantifier, conditions, actions, container, parent);
}