| | |
| | | */ |
| | | public ProfileStackFrame(String className, String methodName) |
| | | { |
| | | |
| | | this.className = className; |
| | | this.methodName = methodName; |
| | | |
| | |
| | | */ |
| | | public String getClassName() |
| | | { |
| | | |
| | | return className; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getMethodName() |
| | | { |
| | | |
| | | return methodName; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getHTMLSafeMethodName() |
| | | { |
| | | |
| | | int length = methodName.length(); |
| | | StringBuilder buffer = new StringBuilder(length + 6); |
| | | |
| | |
| | | */ |
| | | public HashMap<Integer,Long> getLineNumbers() |
| | | { |
| | | |
| | | return lineNumbers; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void updateLineNumberCount(int lineNumber, long numOccurrences) |
| | | { |
| | | |
| | | Long existingCount = lineNumbers.get(lineNumber); |
| | | if (existingCount == null) |
| | | { |
| | |
| | | */ |
| | | public long getTotalCount() |
| | | { |
| | | |
| | | long totalCount = 0; |
| | | |
| | | for (Long l : lineNumbers.values()) |
| | |
| | | */ |
| | | public ProfileStackFrame[] getSubordinateFrames() |
| | | { |
| | | |
| | | ProfileStackFrame[] subFrames = new ProfileStackFrame[0]; |
| | | subFrames = subordinateFrames.values().toArray(subFrames); |
| | | |
| | |
| | | */ |
| | | public boolean hasSubFrames() |
| | | { |
| | | |
| | | return (! subordinateFrames.isEmpty()); |
| | | } |
| | | |
| | |
| | | public void recurseSubFrames(ProfileStack stack, int depth, long count, |
| | | HashMap<String,HashMap<ProfileStack,Long>> stacksByMethod) |
| | | { |
| | | |
| | | if (depth < 0) |
| | | { |
| | | return; |
| | |
| | | */ |
| | | public int hashCode() |
| | | { |
| | | |
| | | return (className.hashCode() + methodName.hashCode()); |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean equals(Object o) |
| | | { |
| | | |
| | | if (o == null) |
| | | { |
| | | return false; |
| | |
| | | public int compareTo(Object o) |
| | | throws ClassCastException |
| | | { |
| | | |
| | | ProfileStackFrame f; |
| | | try |
| | | { |
| | |
| | | */ |
| | | public String toString() |
| | | { |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | buffer.append(getTotalCount()); |
| | | buffer.append(" "); |