org.apache.log4j.rule

## 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.
  Author:
    Scott Deboy (sdeboy@apache.org)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static RuleFactory` | `getInstance()` Get instance.
    `Rule` | `getRule(String symbol, Stack stack)` Create rule from applying operator to stack.
    `boolean` | `isRule(String symbol)` Determine if specified string is a known operator.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### 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

Copyright © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.