Package ch.qos.logback.core.joran.spi

# Class SimpleRuleStore

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.joran.spi.SimpleRuleStore

All Implemented Interfaces:
  `RuleStore`, `ContextAware`

public class SimpleRuleStore extends ContextAwareBase implements RuleStore
This class implements the `RuleStore` interface. It is the rule store implementation used by default in Joran.

Author:
  Ceki Gülcü

## Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

## Constructor Summary

Constructors
Constructor
Description
`SimpleRuleStore(Context context)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addRule(ElementSelector elementSelector, Action action)`
Add a new rule, i.e.
`void`
`addRule(ElementSelector elementSelector, String actionClassName)`
Add a new rule, given by a pattern and a action class (String).
`List<Action>`
`matchActions(ElementPath elementPath)`
Return a list of actions matching a pattern.
`String`
`toString()`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

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

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

## Constructor Details

### SimpleRuleStore

public SimpleRuleStore(Context context)

## Method Details

### addRule

public void addRule(ElementSelector elementSelector, Action action)
Add a new rule, i.e. a pattern, action pair to the rule store.

Note that the added action's LoggerRepository will be set in the process.

Specified by:
  `addRule` in interface `RuleStore`

### addRule

public void addRule(ElementSelector elementSelector, String actionClassName)
Description copied from interface: `RuleStore`
Add a new rule, given by a pattern and a action class (String).

Specified by:
  `addRule` in interface `RuleStore`

### matchActions

public List<Action> matchActions(ElementPath elementPath)
Description copied from interface: `RuleStore`
Return a list of actions matching a pattern.

Specified by:
  `matchActions` in interface `RuleStore`
Parameters:
  `elementPath` - the path to match for
Returns:
  list of matching actions

### toString

public String toString()

Overrides:
  `toString` in class `Object`