|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wotonomy.ui.swing.util.StackTraceInspector
public class StackTraceInspector
The StackTraceInspector displays a JFrame containing
stack trace information for a Throwable.
There are also a few static methods for obtaining
information about the current stack, which is useful
for determining who's calling you at runtime.
Field Summary | |
---|---|
static java.lang.String |
COPY
|
protected java.util.List |
methodNames
|
protected javax.swing.JTable |
table
|
protected java.util.List |
tableModelListeners
|
Constructor Summary | |
---|---|
StackTraceInspector()
Displays the current stack trace at the time of instantiation in a table on a frame. |
|
StackTraceInspector(java.util.List aStringList)
Simply displays the list items in a dialog. |
|
StackTraceInspector(java.lang.String aMessage)
Displays the current stack trace at the time of instantiation in a table on a frame annotated with the specified message. |
|
StackTraceInspector(java.lang.Throwable aThrowable)
Displays the stack trace for the given throwable in a table on a frame. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
|
void |
addTableModelListener(javax.swing.event.TableModelListener l)
|
void |
copyToClipboard()
Copies the contents of the table to the clipboard as a tab-delimited string. |
java.lang.Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int columnIndex)
|
static java.lang.String |
getMyCaller()
Convenience method that obtains a String representing the caller's caller. |
int |
getRowCount()
|
java.lang.String |
getSelectedStackString()
Converts the selected contents of the table to a string. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
protected void |
initLayout(java.util.List items,
java.lang.String message)
|
protected void |
invokeFileFromString(java.lang.String aString)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Double click to call invokeFileFromString. |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
static java.util.List |
parseStackTrace(java.lang.Throwable aThrowable)
Obtains a list of strings representing the stack trace associated with this throwable starting with the most recent call. |
static void |
printShortStackTrace()
Prints a stack trace up to the first method whose fully qualified class name begins with "java" to System.out. |
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
|
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.swing.JTable table
protected java.util.List tableModelListeners
protected java.util.List methodNames
public static final java.lang.String COPY
Constructor Detail |
---|
public StackTraceInspector()
public StackTraceInspector(java.lang.String aMessage)
public StackTraceInspector(java.lang.Throwable aThrowable)
aThrowable
- A Throwable whose stack will be examined.public StackTraceInspector(java.util.List aStringList)
aStringList
- A List containing Strings.Method Detail |
---|
protected void initLayout(java.util.List items, java.lang.String message)
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
public java.lang.Class getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
public void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener
in interface javax.swing.table.TableModel
public void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener
in interface javax.swing.table.TableModel
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
public void copyToClipboard()
public java.lang.String getSelectedStackString()
public static java.util.List parseStackTrace(java.lang.Throwable aThrowable)
aThrowable
- A Throwable whose stack trace is parsed.
public static java.lang.String getMyCaller()
public static void printShortStackTrace()
protected void invokeFileFromString(java.lang.String aString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |