Package org.tod.meta

Examples of org.tod.meta.MethodInfo


        if (result.live) {
            // Work with live callstack instead.
            int n = result.liveStack.size();
            for (int i = 0; i < n; i++) {
                StackFrame sf = result.liveStack.get(i);
                MethodInfo method = getTODSession().getClassInformationProvider().getMethodInfo(sf.location().method());
                method.setLineNumber(sf.location().lineNumber());
                stack.add(method);
            }
        }else if(result.lastEvent != null && result.lastEvent instanceof IMethodCallEvent && isStepInto){
            stack = this.getTODSession().getTODHandler().getCallStack(result.lastEvent, isStepInto, isForward, false);
        }else if(result.lastEvent != null && result.afterLastEvent != null && isForward){
View Full Code Here


                return true;
            }
           
            // Use either executedBehavior or calledBehavior, in that order, depending on which is available.
            IBehaviorInfo intendedBehavior = executedBehavior != null ? executedBehavior : calledBehavior;
            MethodInfo methodInfo = getTODSession().getClassInformationProvider().getMethodInfo(intendedBehavior);
            return !getTODSession().getFilter().acceptMethod(methodInfo);
        } else if (ile instanceof ICallerSideEvent) {
            ICallerSideEvent callerSideEvent = (ICallerSideEvent)ile;
            IBehaviorInfo operationBehavior = callerSideEvent.getOperationBehavior();
            if (operationBehavior == null) {
                return true;
            }
           
            // If it is something that occurred in java's SDK, ignore it.

            // Do we wish to filter out events from this method?
            MethodInfo methodInfo = getTODSession().getClassInformationProvider().getMethodInfo(operationBehavior);
            return !getTODSession().getFilter().acceptMethod(methodInfo);
        }
       
        return false;
    }
View Full Code Here

        // If there is no associated behavior, TOD does not have information
        // for the given class. It is likely out of scope.
        if (behavior == null || calledBehavior == null || calledBehavior.isStaticInit()) {
            return null;
        }
        MethodInfo methodInfo = session.getClassInformationProvider().getMethodInfo(behavior);
        MethodInfo targetMethodInfo = session.getClassInformationProvider().getMethodInfo(calledBehavior);
        if (!session.getFilter().acceptMethod(targetMethodInfo)) {
            return null;
        }
        s.setType(StepType.METHOD_CALL);
        s.setLive(live);
View Full Code Here

        // If there is no associated behavior, TOD does not have information
        // for the given class. It is likely out of scope.
        if (behavior == null || behavior.isStaticInit()) {
            return null;
        }
        MethodInfo methodInfo = session.getClassInformationProvider().getMethodInfo(behavior);
        if (!session.getFilter().acceptMethod(methodInfo)) {
            return null;
        }
        s.setType(StepType.METHOD_RETURN);
        s.setLive(live);
View Full Code Here

    }

    @Override
    public String getDisplayName(Object node) {
        if (node instanceof MethodInfo) {
            MethodInfo method = (MethodInfo) node;
            String name = node.toString();
            //remove the extra package name hidden to quorum users
            name = name.substring("quorum.".length());
            //remove the extra parentheses at the end of the name
            name = name.substring(0, name.length() - 2);
            if(method.getLineNumber() != -1) {
                name += ":" + method.getLineNumber();
            }
            if(stack != null && !stack.isEmpty()) {
                MethodInfo top = stack.get(0);
                if(node == top) { //it's the top of the stack.
                    return "<html><strong>" + name + "</strong></html>";
                }
            }
            return name;
View Full Code Here

    @Override
    public String getIconBase(Object node) {
        if (node instanceof MethodInfo) {
            if(stack != null && !stack.isEmpty()) {
                MethodInfo top = stack.get(0);
                if (top == node) {
                    return CURRENT_CALL_STACK;
                } else {
                    return CALL_STACK;
                }
View Full Code Here

    @Override
    public void performDefaultAction(Object o) throws UnknownTypeException {
        // TODO: dont run on event dispatch
        if (o instanceof MethodInfo) {
            MethodInfo mi = (MethodInfo)o;
            QuorumDebuggerUtils.jumpToCallStackLocation(mi.getOwningClass().getFullyQualifiedName(), mi.getLineNumber());
        }
    }
View Full Code Here

        }

        @Override
        public void perform(Object[] nodes) {
            if (nodes[0] instanceof MethodInfo) {
                MethodInfo mi = (MethodInfo)nodes[0];
                QuorumDebuggerUtils.jumpToCallStackLocation(mi.getOwningClass().getFullyQualifiedName(), mi.getLineNumber());
            }
        }
View Full Code Here

        boolean loggedMethod = false;
        if (event instanceof IMethodCallEvent) {
            IMethodCallEvent mce = (IMethodCallEvent)event;
            if (mce.getCalledBehavior() != null && isForward) {
                IBehaviorInfo b = mce.getCalledBehavior();
                MethodInfo i = getTODSession().getClassInformationProvider().getMethodInfo(b);
                mce.getOperationBytecodeIndex();
                int n = TypeUtils.calculateLineNumber(b, mce.getOperationBytecodeIndex());
                i.setLineNumber(n);
                stack.add(i);
                loggedMethod = true;
            }
        }
        ICallerSideEvent currentEvent = (ICallerSideEvent)event;
        boolean isFirst = true;
        do {
            if (currentEvent.getOperationBehavior() != null) {
                IBehaviorInfo method = currentEvent.getOperationBehavior();
                MethodInfo i = getTODSession().getClassInformationProvider().getMethodInfo(method);
                int n = TypeUtils.calculateLineNumber(method, currentEvent.getOperationBytecodeIndex());
                //we really need the current location not some calculated position...is this possible?
                i.setLineNumber(n);
                if(!isStepInto && isFirst && isForward && event instanceof IMethodCallEvent){
                    isFirst = false;
                }else{
                    stack.add(i);
                }
View Full Code Here

TOP

Related Classes of org.tod.meta.MethodInfo

Copyright © 2018 www.massapicom. 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.