Logback API
Version 0.9.8

ch.qos.logback.core.joran.spi
Class Interpreter

java.lang.Object
  extended by ch.qos.logback.core.joran.spi.Interpreter

public class Interpreter
extends Object

Interpreter is Joran's main driving class. It extends SAX DefaultHandler which invokes various actions according to predefined patterns.

Patterns are kept in a RuleStore which is programmed to store and then later produce the applicable actions for a given pattern.

The pattern corresponding to a top level <a> element is the string "a".

The pattern corresponding to an element <b> embedded within a top level <a> element is the string "a/b".

The pattern corresponding to an <b> and any level of nesting is "*/b. Thus, the * character placed at the beginning of a pattern serves as a wildcard for the level of nesting. Conceptually, this is very similar to the API of commons-digester. Joran offers several small advantages. First and foremost, it offers support for implicit actions which result in a significant leap in flexibility. Second, in our opinion better error reporting capability. Third, it is self-reliant. It does not depend on other APIs, in particular commons-logging which is too unreliable. Last but not least, Joran is quite tiny and is expected to remain so.

Author:
Ceki Gülcuü

Constructor Summary
Interpreter(Context context, RuleStore rs)
           
 
Method Summary
 void addEvents(List<SaxEvent> eventList)
           
 void addImplicitAction(ImplicitAction ia)
           
 void characters(BodyEvent be)
           
 void endElement(EndEvent endEvent)
           
 InterpretationContext getExecutionContext()
           
 Locator getLocator()
           
 RuleStore getRuleStore()
           
 void play(List<SaxEvent> eventList)
           
 void setDocumentLocator(Locator l)
           
 void startDocument()
           
 void startElement(StartEvent se)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interpreter

public Interpreter(Context context,
                   RuleStore rs)
Method Detail

getExecutionContext

public InterpretationContext getExecutionContext()

startDocument

public void startDocument()

startElement

public void startElement(StartEvent se)

characters

public void characters(BodyEvent be)

endElement

public void endElement(EndEvent endEvent)

getLocator

public Locator getLocator()

setDocumentLocator

public void setDocumentLocator(Locator l)

addImplicitAction

public void addImplicitAction(ImplicitAction ia)

getRuleStore

public RuleStore getRuleStore()

play

public void play(List<SaxEvent> eventList)

addEvents

public void addEvents(List<SaxEvent> eventList)

Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.