public static Rule getRule(@SuppressWarnings("rawtypes") final Stack stack) {
    if (stack.size() < 1) {
      throw new IllegalArgumentException("Invalid EXISTS rule - expected one parameter but received " + stack.size());
    }

    return new ExistsRule(stack.pop().toString());
  }
Create an instance of ExistsRule using the top name on the stack.

@param stack stack
@return instance of ExistsRule.
olv-core/src/main/java/pl/otros/logview/accept/query/org/apache/log4j/rule/ExistsRule.java