org.hopto.pentaj.jexin.stacktrace
Class ActiveTemplateMap

java.lang.Object
  extended by org.hopto.pentaj.jexin.stacktrace.ActiveTemplateMap

public class ActiveTemplateMap
extends java.lang.Object

A map of StackFrame to StackFrameTemplate. The key is the first StackFrame from activated StackFrameTemplates. This map does not follow standard map semantics. activateTemplate and deactivateTemplate must be called with the same object or the behavior will be unexpected. getActiveTemplates can be called with any StackFrame and it will match, or not, the first StackFrame in an active template depending on the configuration of that template.


Constructor Summary
ActiveTemplateMap()
           
 
Method Summary
 void activateTemplate(StackTraceTemplate template)
          Activates the template.
 void deactivateTemplate(StackTraceTemplate template)
          Deactivates the template.
 StackFrameProcessor getStackFrameProcessor(StackFrame stackFrame, java.util.List<InjectableException> injectableExceptions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveTemplateMap

public ActiveTemplateMap()
Method Detail

activateTemplate

public void activateTemplate(StackTraceTemplate template)
Activates the template. Once activated new StackTraces will attempt to match its pattern and inject the specified exceptions

Parameters:
template -

deactivateTemplate

public void deactivateTemplate(StackTraceTemplate template)
Deactivates the template. StackTraces that are open and have started matching the template will continue.

Parameters:
template -

getStackFrameProcessor

public StackFrameProcessor getStackFrameProcessor(StackFrame stackFrame,
                                                  java.util.List<InjectableException> injectableExceptions)
Parameters:
stackFrame -
injectableExceptions - The exceptions that are eligible to be injected if the completed trace is converted to a template
Returns:
A StackFrameProcessor for the stackFrame