Search in sources :

Example 1 with CallgraphBuilder

use of com.jopdesign.common.code.CallGraph.CallgraphBuilder in project jop by jop-devel.

the class AppInfo method buildCallGraph.

/**
     * Build a new default callgraph using the current roots as roots for the callgraph, if the default
     * callgraph has not yet been created.
     * @param rebuild if true, rebuild the graph if it already exists. All manual changes and optimizations
     *                of the graph will be lost.
     * @return the default callgraph
     */
public CallGraph buildCallGraph(boolean rebuild) {
    if (rebuild) {
        // we set the callgraph null first, so that rebuilding it does not use the old graph
        callGraph = null;
    }
    if (callGraph == null) {
        CallgraphBuilder builder = new DefaultCallgraphBuilder(getCallstringLength());
        buildCallGraph(builder);
    }
    return callGraph;
}
Also used : DefaultCallgraphBuilder(com.jopdesign.common.code.DefaultCallgraphBuilder) DefaultCallgraphBuilder(com.jopdesign.common.code.DefaultCallgraphBuilder) CallgraphBuilder(com.jopdesign.common.code.CallGraph.CallgraphBuilder)

Aggregations

CallgraphBuilder (com.jopdesign.common.code.CallGraph.CallgraphBuilder)1 DefaultCallgraphBuilder (com.jopdesign.common.code.DefaultCallgraphBuilder)1