当前位置: 首页>>代码示例>>Java>>正文


Java LinkedDirectedGraph.connect方法代码示例

本文整理汇总了Java中com.google.javascript.jscomp.graph.LinkedDirectedGraph.connect方法的典型用法代码示例。如果您正苦于以下问题:Java LinkedDirectedGraph.connect方法的具体用法?Java LinkedDirectedGraph.connect怎么用?Java LinkedDirectedGraph.connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.javascript.jscomp.graph.LinkedDirectedGraph的用法示例。


在下文中一共展示了LinkedDirectedGraph.connect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPassGraph

import com.google.javascript.jscomp.graph.LinkedDirectedGraph; //导入方法依赖的package包/类
/**
 * Gets a graph of the passes run. For debugging.
 */
GraphvizGraph getPassGraph() {
  LinkedDirectedGraph<String, String> graph = LinkedDirectedGraph.create();
  Iterable<PassFactory> allPasses =
      Iterables.concat(getChecks(), getOptimizations());
  String lastPass = null;
  String loopStart = null;
  for (PassFactory pass : allPasses) {
    String passName = pass.getName();
    int i = 1;
    while (graph.hasNode(passName)) {
      passName = pass.getName() + (i++);
    }
    graph.createNode(passName);

    if (loopStart == null && !pass.isOneTimePass()) {
      loopStart = passName;
    } else if (loopStart != null && pass.isOneTimePass()) {
      graph.connect(lastPass, "loop", loopStart);
      loopStart = null;
    }

    if (lastPass != null) {
      graph.connect(lastPass, "", passName);
    }
    lastPass = passName;
  }
  return graph;
}
 
开发者ID:andyjko,项目名称:feedlack,代码行数:32,代码来源:PassConfig.java

示例2: toGraphvizGraph

import com.google.javascript.jscomp.graph.LinkedDirectedGraph; //导入方法依赖的package包/类
LinkedDirectedGraph<JSModule, String> toGraphvizGraph() {
  LinkedDirectedGraph<JSModule, String> graphViz =
      LinkedDirectedGraph.create();
  for (JSModule module : getAllModules()) {
    graphViz.createNode(module);
    for (JSModule dep : module.getDependencies()) {
      graphViz.createNode(dep);
      graphViz.connect(module, "->", dep);
    }
  }
  return graphViz;
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:13,代码来源:JSModuleGraph.java

示例3: getPassGraph

import com.google.javascript.jscomp.graph.LinkedDirectedGraph; //导入方法依赖的package包/类
/**
 * Gets a graph of the passes run. For debugging.
 */
GraphvizGraph getPassGraph() {
  LinkedDirectedGraph<String, String> graph =
      LinkedDirectedGraph.createWithoutAnnotations();
  Iterable<PassFactory> allPasses =
      Iterables.concat(getChecks(), getOptimizations());
  String lastPass = null;
  String loopStart = null;
  for (PassFactory pass : allPasses) {
    String passName = pass.getName();
    int i = 1;
    while (graph.hasNode(passName)) {
      passName = pass.getName() + (i++);
    }
    graph.createNode(passName);

    if (loopStart == null && !pass.isOneTimePass()) {
      loopStart = passName;
    } else if (loopStart != null && pass.isOneTimePass()) {
      graph.connect(lastPass, "loop", loopStart);
      loopStart = null;
    }

    if (lastPass != null) {
      graph.connect(lastPass, "", passName);
    }
    lastPass = passName;
  }
  return graph;
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:33,代码来源:PassConfig.java

示例4: toGraphvizGraph

import com.google.javascript.jscomp.graph.LinkedDirectedGraph; //导入方法依赖的package包/类
@SuppressWarnings("unused")
LinkedDirectedGraph<JSModule, String> toGraphvizGraph() {
  LinkedDirectedGraph<JSModule, String> graphViz =
      LinkedDirectedGraph.create();
  for (JSModule module : getAllModules()) {
    graphViz.createNode(module);
    for (JSModule dep : module.getDependencies()) {
      graphViz.createNode(dep);
      graphViz.connect(module, "->", dep);
    }
  }
  return graphViz;
}
 
开发者ID:google,项目名称:closure-compiler,代码行数:14,代码来源:JSModuleGraph.java


注:本文中的com.google.javascript.jscomp.graph.LinkedDirectedGraph.connect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。