org.apache.log4j.rule
Class RuleFactory

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

public final class RuleFactory
extends java.lang.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
static RuleFactory getInstance()
          Get instance.
 Rule getRule(java.lang.String symbol, java.util.Stack stack)
          Create rule from applying operator to stack.
 boolean isRule(java.lang.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(java.lang.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(java.lang.String symbol,
                    java.util.Stack stack)
Create rule from applying operator to stack.

Parameters:
symbol - symbol
stack - stack
Returns:
new instance


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

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