Package dk.brics.jwig.analysis.graph

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


        return visualize(successors);
    }

    public String visualizePredecessors(State state) {
        Set<State> successors = new HashSet<State>();
        for (Transition transition : new PredecessorResolver(stateMachine)
                .getPredecessors(state))
            successors.add(transition.getTarget());
        successors.add(state);
        return visualize(successors);
    }
View Full Code Here


    public void check(StateMachine machine) {
        log.info("Type checking invocations of makeURL.");
        typeCheckInvocations(machine);
        log.info("Done checking invocations of makeURL.");
        log.info("Checking filter invocations.");
        PredecessorResolver predecessorResolver = new PredecessorResolver(
                machine);
        for (FilterState filter : machine.getFilterStates()) {
            checkFilterParameters(predecessorResolver, filter);
        }
        log.info("Done checking filter invocations.");
View Full Code Here

        }
        linkFilterGroups(interfacee, stateMachine);

        log.info("Done linking makeURL invocations to the Registered Methods");
        log.info("Checking for ambiguous priorities");
        PredecessorResolver predecessorResolver = new PredecessorResolver(
                stateMachine);
        // TODO move to checking phase
        for (WebMethodState state : stateMachine.getInitialStates())
            checkPriorities(state);
        // TODO move to checking phase
View Full Code Here

    // TODO move this to some class?
    public static Set<SootClass> findPredecessorWebApp(
            StateMachine stateMachine, JwigResolver resolver,
            SootMethod enclosingMethod) {
        Set<SootClass> targetedWebApps = new HashSet<SootClass>();
        PredecessorResolver pred = new PredecessorResolver(stateMachine);
        HashSet<State> seen = new HashSet<State>();
        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)) {
View Full Code Here

TOP

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

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.