Package dk.brics.jwig.analysis.graph

Examples of dk.brics.jwig.analysis.graph.State


     */
    private void checkPriorities(WebMethodState state) {
        Map<Integer, State> priorityMap = new HashMap<Integer, State>();
        for (Transition transition : state.getTransitions()) {
            if (transition instanceof FilterTransition) {
                final State target = transition.getTarget();
                if (!target.isDefaultPriority()) {
                    final Integer priority = target.getPriority();
                    if (priorityMap.containsKey(priority)) {
                        Feedbacks.add(new AmbiguousPriority(state, target,
                                priorityMap.get(priority)));
                    } else {
                        priorityMap.put(priority, target);
View Full Code Here


        if (targetedWebApps.isEmpty()) {
            Feedbacks.add(new UnresolvedWebAppGivenToMakeURL(enclosingMethod,
                    statement));
        }

        final State callerState = stateMachine.getState(enclosingMethod);
        for (SootClass containingClass : targetedWebApps) {
            Set<Method> webMethods = getTargetedWebMethods(possibleValues,
                    containingClass, enclosingMethod, statement, interfacee);
            for (Method webMethod : webMethods) {
                // create state
                SootMethod method = resolver.getSootMethod(webMethod);
                State webMethodState = stateMachine.getState(method);

                // link
                Transition transition = new WebMethodTransition(expr);
                callerState.addSuccessor(transition);
                transition.setTarget(webMethodState);
View Full Code Here

        LinkedList<State> workList = new LinkedList<State>();
        workList.add(stateMachine.getState(enclosingMethod));
        while (!workList.isEmpty()) {
            // move _backwards_ from the current state, gathering any
            // webapps on the way - these can be context
            State state1 = workList.removeFirst();
            SootMethod callingMethod = state1.getMethod();
            SootClass declaringClass = callingMethod.getDeclaringClass();
            if (resolver.isWebApp(declaringClass)) {
                targetedWebApps.add(declaringClass);
            } else {
                for (Transition predecessor : pred.getPredecessors(state1)) {
                    if (predecessor instanceof HandlerTransition
                            || predecessor instanceof LambdaTransition
                            || predecessor instanceof FilterTransition) {
                        State target = predecessor.getTarget();
                        if (!seen.contains(target)) {
                            seen.add(target);
                            workList.add(target);
                        }
                    }
View Full Code Here

TOP

Related Classes of dk.brics.jwig.analysis.graph.State

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.