站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

StackTrace.Entry (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util
Class StackTrace.Entry

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

public static final class StackTrace.Entry
extends Object
implements Cloneable, Serializable, Printable

A stack trace entry.

See Also:
Serialized Form

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

See Also:
Constant Field Values

DEFAULT

public static final String DEFAULT
Default package token

See Also:
Constant Field Values

className

protected String className
The fully qualified class name for this entry


methodName

protected String methodName
The method name for this entry


sourceFileName

protected String sourceFileName
The source file name for this entry


lineNumber

protected String lineNumber
The source file line number for this entry

Constructor Detail

StackTrace.Entry

public StackTrace.Entry(String className,
                        String methodName,
                        String sourceFileName,
                        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(String raw)
Construct a new StackTrace entry.

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

parse

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

Parameters:
raw - Raw stack trace.

getClassName

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

Returns:
The class name for this entry.

getShortClassName

public 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 String getMethodName()
Get the method name for this entry.

Returns:
The method name for this entry.

getFullMethodName

public 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 String getSourceFileName()
Get the source file name for this entry.

Returns:
The source file name for this entry.

getLineNumber

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

Returns:
The source file line number for this entry.

toString

public String toString(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 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(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 Object clone()
Returns a shallow cloned copy of this object.

Returns:
A shallow cloned copy of this object.

print

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

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

print

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

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

print

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

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

print

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

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

print

public void print(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.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.