diff --git a/src/org/ntlab/traceDebugger/analyzerProvider/Alias.java b/src/org/ntlab/traceDebugger/analyzerProvider/Alias.java index 0ff8e1a..0579ac5 100644 --- a/src/org/ntlab/traceDebugger/analyzerProvider/Alias.java +++ b/src/org/ntlab/traceDebugger/analyzerProvider/Alias.java @@ -72,6 +72,26 @@ return occurrencePoint.getMethodExecution().getSignature(); // return occurrencePoint.getMethodExecution().getCallerSideSignature(); } + + /** + * Get time stamp of statement. + * @return + */ + public long getTimeStamp() { + if (!occurrencePoint.isValid()) { + return occurrencePoint.getMethodExecution().getEntryTime(); + } + long stTimeStamp = occurrencePoint.getStatement().getTimeStamp(); + Statement st = occurrencePoint.getStatement(); + if (aliasType == AliasType.RETURN_VALUE) { + stTimeStamp = occurrencePoint.getMethodExecution().getExitTime(); + } else if (aliasType == AliasType.METHOD_INVOCATION && st instanceof MethodInvocation) { + stTimeStamp = ((MethodInvocation) st).getCalledMethodExecution().getExitTime(); + } else if (aliasType == AliasType.FORMAL_PARAMETER) { + stTimeStamp = occurrencePoint.getMethodExecution().getEntryTime(); + } + return stTimeStamp; + } public int getLineNo() { try {