Package soot

Examples of soot.SootMethod.retrieveActiveBody()


        SootMethod mainStartRunMethod = mainClass.getMethodByName("startRun");

        for (Iterator methods = mainClass.getMethods().iterator(); methods
                .hasNext();) {
            SootMethod method = (SootMethod) methods.next();
            JimpleBody body = (JimpleBody) method.retrieveActiveBody();

            for (Iterator units = body.getUnits().snapshotIterator(); units
                    .hasNext();) {
                Stmt stmt = (Stmt) units.next();
View Full Code Here


                mainClass);

        for (Iterator methods = mainClass.getMethods().iterator(); methods
                .hasNext();) {
            SootMethod method = (SootMethod) methods.next();
            JimpleBody body = (JimpleBody) method.retrieveActiveBody();
            LocalSplitter.v().transform(body, phaseName + ".lns");
            LocalNameStandardizer.v().transform(body, phaseName + ".lns");
            TypeResolver.resolve(body, Scene.v());
        }
View Full Code Here

    public Collection<SootClass> findWebApps(SootClass webSiteClass) {
        SootMethod initMethod = webSiteClass.getMethodByName("init");
        log.info("Adding web app classes to analysis");
        Set<SootClass> webapps = new HashSet<SootClass>();
        ExceptionalUnitGraph graph = new ExceptionalUnitGraph(
                initMethod.retrieveActiveBody());
        for (Unit aGraph : graph) {
            assert aGraph instanceof Stmt;
            Stmt st = (Stmt) aGraph;
            if (st instanceof JAssignStmt) {
                JAssignStmt jAssignStmt = (JAssignStmt) st;
View Full Code Here

        c.setApplicationClass();
        Iterator mi = c.getMethods().iterator();
        while (mi.hasNext()) {
            SootMethod sm = (SootMethod) mi.next();
            if (sm.isConcrete()) {
                sm.retrieveActiveBody();
            }
        }
        return c;
    }
   
View Full Code Here

            SootClass ac = (SootClass) aci.next();
            Iterator mi = ac.getMethods().iterator();
            while (mi.hasNext()) {
                SootMethod sm = (SootMethod) mi.next();
                if (sm.isConcrete()) {
                    CompleteUnitGraph cug = new CompleteUnitGraph(sm.retrieveActiveBody());
                    Iterator si = cug.iterator();
                    while (si.hasNext()) {
                        Stmt stmt = (Stmt) si.next();
                        if (stmt.containsInvokeExpr()) {
                            InvokeExpr expr = stmt.getInvokeExpr();
View Full Code Here

        LinkedList<SootMethod> queue = new LinkedList<SootMethod>();
        queue.add(initialMethod);
        while (!queue.isEmpty()) {
            log.debug("Methods-to-visit-queue has a size of " + queue.size());
            SootMethod method = queue.removeFirst();
            final Body body = method.retrieveActiveBody();
            CompleteUnitGraph cug = new CompleteUnitGraph(body);
            for (Unit aCug : cug) {
                assert aCug instanceof Stmt;
                Stmt st = (Stmt) aCug;
                if (st.containsInvokeExpr()) {
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.