Package com.oracle.coherence.common.base
Class StackTrace.StackFrame
- java.lang.Object
-
- com.oracle.coherence.common.base.StackTrace.StackFrame
-
- Enclosing class:
- StackTrace
public static class StackTrace.StackFrame extends Object
A class that provides "stack frame" information from a line of a stack trace.
-
-
Field Summary
Fields Modifier and Type Field Description static StackTrace.StackFrameUNKNOWN
-
Constructor Summary
Constructors Constructor Description StackFrame(String sExcept)Construct a StackFrame object from a line of a stack trace.StackFrame(String sFile, String sClass, String sMethod, int nLine)Construct a StackFrame object from its constituent data members.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClassName()StringgetFileName()StringgetLine()intgetLineNumber()StringgetMethodName()StringgetShortClassName()protected voidinit(String sFile, String sClass, String sMethod, int nLine)Initialize the fields of the StackFrame object.StringtoShortString()StringtoString()
-
-
-
Field Detail
-
UNKNOWN
public static final StackTrace.StackFrame UNKNOWN
-
-
Constructor Detail
-
StackFrame
public StackFrame(String sExcept)
Construct a StackFrame object from a line of a stack trace.- Parameters:
sExcept- a line of a stack trace in the format used by the reference implementation of the JVM
-
StackFrame
public StackFrame(String sFile, String sClass, String sMethod, int nLine)
Construct a StackFrame object from its constituent data members.- Parameters:
sFile- the source file name (e.g. Test.java)sClass- the fully qualified class name (e.g. pkg.Test$1)sMethod- the method name (e.g. main)nLine- the line number (e.g. 17) or 0 if unknown
-
-
Method Detail
-
init
protected void init(String sFile, String sClass, String sMethod, int nLine)
Initialize the fields of the StackFrame object.- Parameters:
sFile- the source file name (e.g. Test.java)sClass- the fully qualified class name (e.g. pkg.Test$1)sMethod- the method name (e.g. main)nLine- the line number (e.g. 17) or 0 if unknown
-
getFileName
public String getFileName()
- Returns:
- the source file name (e.g. Test.java)
-
getClassName
public String getClassName()
- Returns:
- the fully qualified class name (e.g. pkg.Test$1)
-
getShortClassName
public String getShortClassName()
- Returns:
- the short class name (e.g. Test.1)
-
getMethodName
public String getMethodName()
- Returns:
- the method name (e.g. main)
-
getLineNumber
public int getLineNumber()
- Returns:
- the line number (e.g. 17) or 0 if unknown
-
getLine
public String getLine()
- Returns:
- the line of source code if possible or null
-
toString
public String toString()
-
toShortString
public String toShortString()
- Returns:
- a short String representation of the StackFrame
-
-