*
* @throws InvalidFilterException If the input filter is invalid.
*/
public static MessageFilter compile(String filter) throws InvalidFilterException {
MessageFilterParser parser = MessageFilterParser.createParser(filter);
MessageFilterTranslatable t = parseToTranslatable(parser);
MessageFilter translate = t.translate();
if (BaseMessageFilter.class.isAssignableFrom(translate.getClass())) {
((BaseMessageFilter) translate).setOriginalDslString(filter);
}
return translate;