org.apache.tapestry5.internal.services
Class RegexpStackTraceElementAnalyzer

java.lang.Object
  extended by org.apache.tapestry5.internal.services.RegexpStackTraceElementAnalyzer
All Implemented Interfaces:
StackTraceElementAnalyzer

public class RegexpStackTraceElementAnalyzer
extends Object
implements StackTraceElementAnalyzer

Uses a regular expression to identify which CSS class to apply to a frame. The frame's toString() is used. Uses Matcher.find() to search for a subsequence of the frame's description.

Since:
5.3

Constructor Summary
RegexpStackTraceElementAnalyzer(Pattern pattern, String cssClass)
           
 
Method Summary
 String classForFrame(StackTraceElement frame)
          Returns the CSS class appropriate to the frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexpStackTraceElementAnalyzer

public RegexpStackTraceElementAnalyzer(Pattern pattern,
                                       String cssClass)
Method Detail

classForFrame

public String classForFrame(StackTraceElement frame)
Description copied from interface: StackTraceElementAnalyzer
Returns the CSS class appropriate to the frame.

Specified by:
classForFrame in interface StackTraceElementAnalyzer
Parameters:
frame - stack trace element to be analyzed
Returns:
the CSS class name, or null


Copyright © 2003-2012 The Apache Software Foundation.