Examples of IBehaviorCallEvent


Examples of tod.core.database.event.IBehaviorCallEvent

        // Our parent must be a method call.
        if (!(parent instanceof IBehaviorCallEvent)) {
            return;
        }
       
        IBehaviorCallEvent callEvent = (IBehaviorCallEvent)parent;
        Object target = callEvent.getTarget();
       
        // The target object must be an ObjectId
        if (!(target instanceof ObjectId)) {
            this.thisObject = null;
            return;
View Full Code Here

Examples of tod.core.database.event.IBehaviorCallEvent

    }

    private ICallerSideEvent findParent(SearchResult result) {
        // Find the event that CALLED our current scope.
        IBehaviorInfo current = result.behavior;
        IBehaviorCallEvent call;
       
        // Are we currently on a method call?
        if (result.targetEvent instanceof IBehaviorCallEvent) {
            call = (IBehaviorCallEvent)result.targetEvent;
        } else {
            call = result.targetEvent.getParent();
        }
       
        while (!calledBehavior(call).equals(current)) {
            call = call.getParent();
        }
       
        return call;
    }
View Full Code Here

Examples of tod.core.database.event.IBehaviorCallEvent

        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) {
                    }
                }
            }
        }
View Full Code Here

Examples of tod.core.database.event.IBehaviorCallEvent

        ILogEvent currentEvent;
        do {
            currentEvent = methodCalls.next();

            if (currentEvent instanceof IBehaviorCallEvent) {
                IBehaviorCallEvent call = (IBehaviorCallEvent) currentEvent;
                this.updateArray(call);
            }
        } while (methodCalls.hasNext());

        this.loaded = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.