public class ProfileStack extends Object
Modifier and Type | Field and Description |
---|---|
static int |
LINE_NUMBER_NATIVE
The line number that will be used for stack frames in which the line number is unknown because it is a native
method.
|
static int |
LINE_NUMBER_UNKNOWN
The line number that will be used for stack frames in which the line number is unknown but it is not a native
method.
|
Constructor and Description |
---|
ProfileStack(StackTraceElement[] stackElements)
Creates a new profile stack with the provided information.
|
Modifier and Type | Method and Description |
---|---|
static ProfileStack |
decode(Asn1Reader reader)
Decodes the contents of the provided element as a profile stack.
|
boolean |
equals(Object o)
Indicates whether to the provided object is equal to this profile stack.
|
String |
getClassName(int depth)
Retrieves the class name from the specified frame in the stack.
|
String[] |
getClassNames()
Retrieves the class names in this stack.
|
int |
getLineNumber(int depth)
Retrieves the line number from the specified frame in the stack.
|
int[] |
getLineNumbers()
Retrieves the line numbers in this stack.
|
String |
getMethodName(int depth)
Retrieves the method name from the specified frame in the stack.
|
String[] |
getMethodNames()
Retrieves the method names in this stack.
|
int |
getNumFrames()
Retrieves the number of frames in this stack.
|
int |
hashCode()
Retrieves the hash code for this profile stack.
|
void |
write(Asn1Writer writer)
Encodes and writes this profile stack to the capture file.
|
public static final int LINE_NUMBER_UNKNOWN
public static final int LINE_NUMBER_NATIVE
public ProfileStack(StackTraceElement[] stackElements)
stackElements
- The stack trace elements to use to create this profile stack.public int getNumFrames()
public String[] getClassNames()
public String getClassName(int depth)
depth
- The depth of the frame to retrieve, with the first frame being frame zero.public String[] getMethodNames()
public String getMethodName(int depth)
depth
- The depth of the frame to retrieve, with the first frame being frame zero.public int[] getLineNumbers()
public int getLineNumber(int depth)
depth
- The depth of the frame for which to retrieve the line number.public int hashCode()
public boolean equals(Object o)
public void write(Asn1Writer writer) throws IOException
writer
- The writer to use.IOException
- if an error occurs while writing.public static ProfileStack decode(Asn1Reader reader) throws IOException
reader
- The ASN.1 reader to read the encoded profile stack information from.IOException
- If the element could not be decoded for some reason.Copyright 2010-2022 ForgeRock AS.