org.jboss.util
Class StackTrace.Entry

java.lang.Object
  extended byorg.jboss.util.StackTrace.Entry
All Implemented Interfaces:
java.lang.Cloneable, Printable (src) , java.io.Serializable
Enclosing class:
StackTrace (src)

public static final class StackTrace.Entry
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable, Printable (src)

A stack trace entry.

See Also:
Serialized Form

Field Summary
protected  java.lang.String className
          The fully qualified class name for this entry
static java.lang.String DEFAULT
          Default package token
protected  java.lang.String lineNumber
          The source file line number for this entry
protected  java.lang.String methodName
          The method name for this entry
protected  java.lang.String sourceFileName
          The source file name for this entry
static java.lang.String UNKNOWN
          Unknown element token
 
Constructor Summary
StackTrace.Entry(java.lang.String raw)
          Construct a new StackTrace entry.
StackTrace.Entry(java.lang.String className, java.lang.String methodName, java.lang.String sourceFileName, java.lang.String lineNumber)
          Construct a new StackTrace entry.
 
Method Summary
 java.lang.Object clone()
          Returns a shallow cloned copy of this object.
 boolean equals(java.lang.Object obj)
          Check the equality of a given object with this.
 java.lang.String getClassName()
          Get the class name for this entry.
 java.lang.String getFullMethodName()
          Get the fully qualified method name for this entry.
 java.lang.String getLineNumber()
          Get the source file line number for this entry.
 java.lang.String getMethodName()
          Get the method name for this entry.
 java.lang.String getShortClassName()
          Get the short class name for this entry.
 java.lang.String getSourceFileName()
          Get the source file name for this entry.
 int hashCode()
          Return the hash code of this object.
protected  void parse(java.lang.String raw)
          Parse a raw stack trace entry.
 void print()
          Print this stack trace entry to System.err.
 void print(java.io.PrintStream stream)
          Print this stack trace entry.
 void print(java.io.PrintStream stream, java.lang.String prefix)
          Print this stack trace entry.
 void print(java.io.PrintWriter writer)
          Print this stack trace entry.
 void print(java.io.PrintWriter writer, java.lang.String prefix)
          Print this stack trace entry.
 void print(java.lang.String prefix)
          Print this stack trace entry to System.err.
 java.lang.String toString()
          Return a string representation of this.
 java.lang.String toString(java.lang.String prefix)
          Return a string representation of this with the given prefix.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final java.lang.String UNKNOWN
Unknown element token

See Also:
Constant Field Values (src)

DEFAULT

public static final java.lang.String DEFAULT
Default package token

See Also:
Constant Field Values (src)

className

protected java.lang.String className
The fully qualified class name for this entry


methodName

protected java.lang.String methodName
The method name for this entry


sourceFileName

protected java.lang.String sourceFileName
The source file name for this entry


lineNumber

protected java.lang.String lineNumber
The source file line number for this entry

Constructor Detail

StackTrace.Entry

public StackTrace.Entry(java.lang.String className,
                        java.lang.String methodName,
                        java.lang.String sourceFileName,
                        java.lang.String lineNumber)
Construct a new StackTrace entry.

Parameters:
className - Fully qualified class name.
methodName - Method name.
sourceFileName - Source file name.
lineNumber - Source file line number.

StackTrace.Entry

public StackTrace.Entry(java.lang.String raw)
Construct a new StackTrace entry.

Parameters:
raw - The raw stack trace entry.
Method Detail

parse

protected void parse(java.lang.String raw)
Parse a raw stack trace entry.

Parameters:
raw - Raw stack trace.

getClassName

public java.lang.String getClassName()
Get the class name for this entry.

Returns:
The class name for this entry.

getShortClassName

public java.lang.String getShortClassName()
Get the short class name for this entry.

This is a macro for Classes.stripPackageName(entry.getClassName())

Returns:
The short class name for this entry.

getMethodName

public java.lang.String getMethodName()
Get the method name for this entry.

Returns:
The method name for this entry.

getFullMethodName

public java.lang.String getFullMethodName()
Get the fully qualified method name for this entry.

This is a macro for entry.getClassName() + "." + entry.getMethodName()

Returns:
The fully qualified method name for this entry.

getSourceFileName

public java.lang.String getSourceFileName()
Get the source file name for this entry.

Returns:
The source file name for this entry.

getLineNumber

public java.lang.String getLineNumber()
Get the source file line number for this entry.

Returns:
The source file line number for this entry.

toString

public java.lang.String toString(java.lang.String prefix)
Return a string representation of this with the given prefix.

Parameters:
prefix - Prefix for returned string.
Returns:
A string in the format of prefixclassName.methodName(sourceFileName:lineNumber) or prefixclassName.methodName(sourceFileName) if there is no line number.

toString

public java.lang.String toString()
Return a string representation of this.

Returns:
A string in the format of className.methodName(sourceFileName:lineNumber)

hashCode

public int hashCode()
Return the hash code of this object.

Returns:
The hash code of this object.

equals

public boolean equals(java.lang.Object obj)
Check the equality of a given object with this.

Parameters:
obj - Object to test equality with.
Returns:
True if the given object is equal to this.

clone

public java.lang.Object clone()
Returns a shallow cloned copy of this object.

Returns:
A shallow cloned copy of this object.

print

public void print(java.io.PrintWriter writer,
                  java.lang.String prefix)
Print this stack trace entry.

Specified by:
print in interface Printable (src)
Parameters:
writer - The writer to print to.
prefix - Prefix for string conversion.

print

public void print(java.io.PrintWriter writer)
Print this stack trace entry.

Specified by:
print in interface Printable (src)
Parameters:
writer - The writer to print to.

print

public void print(java.io.PrintStream stream,
                  java.lang.String prefix)
Print this stack trace entry.

Specified by:
print in interface Printable (src)
Parameters:
stream - The stream to print to.
prefix - Prefix for string conversion.

print

public void print(java.io.PrintStream stream)
Print this stack trace entry.

Specified by:
print in interface Printable (src)
Parameters:
stream - The stream to print to.

print

public void print(java.lang.String prefix)
Print this stack trace entry to System.err.

Parameters:
prefix - Prefix for string conversion.

print

public void print()
Print this stack trace entry to System.err.