| | |
| | | */ |
| | | public ProfileStack(StackTraceElement[] stackElements) |
| | | { |
| | | |
| | | numFrames = stackElements.length; |
| | | classNames = new String[numFrames]; |
| | | methodNames = new String[numFrames]; |
| | |
| | | private ProfileStack(String[] classNames, String[] methodNames, |
| | | int[] lineNumbers) |
| | | { |
| | | |
| | | this.numFrames = classNames.length; |
| | | this.classNames = classNames; |
| | | this.methodNames = methodNames; |
| | |
| | | */ |
| | | public int getNumFrames() |
| | | { |
| | | |
| | | return numFrames; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String[] getClassNames() |
| | | { |
| | | |
| | | return classNames; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getClassName(int depth) |
| | | { |
| | | |
| | | return classNames[depth]; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String[] getMethodNames() |
| | | { |
| | | |
| | | return methodNames; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getMethodName(int depth) |
| | | { |
| | | |
| | | return methodNames[depth]; |
| | | } |
| | | |
| | |
| | | */ |
| | | public int[] getLineNumbers() |
| | | { |
| | | |
| | | return lineNumbers; |
| | | } |
| | | |
| | |
| | | */ |
| | | public int getLineNumber(int depth) |
| | | { |
| | | |
| | | return lineNumbers[depth]; |
| | | } |
| | | |
| | |
| | | */ |
| | | public int hashCode() |
| | | { |
| | | |
| | | if (numFrames == 0) |
| | | { |
| | | return 0; |
| | |
| | | */ |
| | | public boolean equals(Object o) |
| | | { |
| | | |
| | | if (o == null) |
| | | { |
| | | return false; |
| | |
| | | */ |
| | | public ASN1Element encode() |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(3*numFrames); |
| | | for (int i=0; i < numFrames; i++) |
| | | { |
| | |
| | | */ |
| | | public static ProfileStack decode(ASN1Element stackElement) |
| | | { |
| | | |
| | | try |
| | | { |
| | | ArrayList<ASN1Element> elements = |