Class RuleFactory

java.lang.Object
org.apache.log4j.rule.RuleFactory

public final class RuleFactory extends Object
A Factory class which, given a string representation of the rule, and a context stack, will return a Rule ready for evaluation against events. If an operator is requested that isn't supported, an IllegalArgumentException is thrown.
  • Field Details

  • Constructor Details

    • RuleFactory

      private RuleFactory()
      Create instance.
  • Method Details

    • getInstance

      public static RuleFactory getInstance()
      Get instance.
      Returns:
      rule factory instance.
    • isRule

      public boolean isRule(String symbol)
      Determine if specified string is a known operator.
      Parameters:
      symbol - string
      Returns:
      true if string is a known operator
    • getRule

      public Rule getRule(String symbol, Stack stack)
      Create rule from applying operator to stack.
      Parameters:
      symbol - symbol
      stack - stack
      Returns:
      new instance