gate.jape
Class SourceInfo
java.lang.Object
gate.jape.SourceInfo
public class SourceInfo
- extends Object
A simple class to store and use the mapping between Java and Jape
source code for error reporting.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SourceInfo
public SourceInfo(String className,
String phaseName,
String sectionName)
addBlock
public String addBlock(String previousCode,
String codeBlock)
getSource
public String getSource(String source,
int javaLineNumber)
getStackTraceElement
public StackTraceElement getStackTraceElement(int javaLineNumber)
enhanceTheThrowable
public void enhanceTheThrowable(Throwable t)
- Enhances a Throwable by replacing mentions of Java code inside a
Jape RhsAction with a reference to the original Jape source where
available.
- Parameters:
t
- the Throwable to enhance with Jape source information