CallStackElement { public String getShortSignature() { if (signature.indexOf('(') == -1 || signature.indexOf(':') != -1) { return null; } String[] split = signature.substring(0, signature.indexOf('(')).split("\\."); if (split.length > 1) { return split[split.length - 2] + '#' + split[split.length - 1]; } else { return split.length == 1 ? split[0] : "null"; } }  static CallStackElement createRoot(String signature); static CallStackElement create(CallStackElement parent, String signature); static CallStackElement create(CallStackElement parent, String signature, long startTimestamp); void recycle(); void removeCallsFasterThan(long thresholdNs); boolean isIOQuery(); long getExecutionTime(); void setExecutionTime(long executionTime); long getNetExecutionTime(); void incrementExecutionTime(long additionalExecutionTime); List<CallStackElement> getChildren(); void setChildren(List<CallStackElement> children); String getSignature(); void setSignature(String signature); String getShortSignature(); CallStackElement getParent(); void setParent(CallStackElement parent); void remove(); void executionStopped(long executionTime); CallStackElement executionStopped(long timestamp, long minExecutionTime); @Override String toString(); String toString(boolean asciiArt, AsciiCallTreeSignatureFormatter callTreeAsciiFormatter);  }
@Test public void testGetShortSignature() { CallStackElement callStackElement = CallStackElement.createRoot("public void org.stagemonitor.tracing.profiler.CallStackElementTest.testGetShortSignature()"); Assert.assertEquals("CallStackElementTest#testGetShortSignature", callStackElement.getShortSignature()); }