if (!(parentEvent instanceof IBehaviorCallEvent)) {
return;
}
getTODSession().getTODHandler().flush();
IBehaviorCallEvent call = (IBehaviorCallEvent)parentEvent;
int startIdx = 1;
// If we're in a non-static method, there is no "this" pointer, so
// we need to subtract 1 from each local variable index we receive
if (call.getCalledBehavior() != null) {
if (call.getCalledBehavior().isStatic() || call.getCalledBehavior().isStaticInit()) {
startIdx = 0;
}
} else if (call.getExecutedBehavior() != null) {
if (call.getExecutedBehavior().isStatic() || call.getExecutedBehavior().isStaticInit()) {
startIdx = 0;
}
}
Object[] arguments = call.getArguments();
List<LocalVariableInfo> localVars = result.behavior.getLocalVariables();
for (int i = 0; i < localVars.size(); i++) {
LocalVariableInfo var = localVars.get(i);
if (var != null) {
if (var.getIndex() <= arguments.length) {
try {
Object arg = arguments[var.getIndex() - startIdx];
this.updateParameter(var, arg, call.getTimestamp());
} catch (ArrayIndexOutOfBoundsException e) {
}
}
}
}