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


Java GraphvizModule类代码示例

本文整理汇总了Java中com.google.inject.grapher.graphviz.GraphvizModule的典型用法代码示例。如果您正苦于以下问题:Java GraphvizModule类的具体用法?Java GraphvizModule怎么用?Java GraphvizModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GraphvizModule类属于com.google.inject.grapher.graphviz包,在下文中一共展示了GraphvizModule类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: dumpGraph

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
@Test
public void dumpGraph() throws Exception
{
	List<Module> modules = new ArrayList<>();
	modules.add(new GraphvizModule());
	modules.add(new RuneLiteModule());

	runelite.setClient(client);

	PluginManager pluginManager = new PluginManager();
	pluginManager.loadCorePlugins();
	for (Plugin p : pluginManager.getPlugins())
	{
		modules.add(p);
	}

	File file = folder.newFile();
	try (PrintWriter out = new PrintWriter(file, "UTF-8"))
	{
		Injector injector = Guice.createInjector(modules);
		GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
		grapher.setOut(out);
		grapher.setRankdir("TB");
		grapher.graph(injector);
	}
}
 
开发者ID:runelite,项目名称:runelite,代码行数:27,代码来源:PluginManagerTest.java

示例2: maybeGraphGuiceDependencies

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
private static void maybeGraphGuiceDependencies(final Injector injector,
    final Class<? extends TextGroupEntryPoint> entryPointClass, final Parameters params)
    throws IOException {

  final Optional<File> dotFile = params.getOptionalCreatableFile(GRAPH_DEPENDENCIES_PARAM);

  if (dotFile.isPresent()) {
    final Injector grapherInjector = Guice.createInjector(new GraphvizModule());
    final GraphvizGrapher grapher = grapherInjector.getInstance(GraphvizGrapher.class);
    // orient graph vertically
    grapher.setRankdir("TB");

    log.info("Writing Guice configuration graph to {}. To compile it, do dot -T png {}",
        dotFile.get(), dotFile.get());
    try (PrintWriter out = new PrintWriter(Files.asCharSink(dotFile.get(), Charsets.UTF_8)
        .openBufferedStream())) {
      grapher.setOut(out);
      grapher.graph(injector, ImmutableSet.<Key<?>>of(Key.get(entryPointClass)));
    }
  }
}
 
开发者ID:BBN-E,项目名称:bue-common-open,代码行数:22,代码来源:TextGroupEntryPoints.java

示例3: graph

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
private static void graph(String filename, Injector gameInjector) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try (PrintWriter bout = new PrintWriter(baos)) {
        Injector injector = Guice.createInjector(new GrapherModule(), new GraphvizModule());
        GraphvizRenderer renderer = injector.getInstance(GraphvizRenderer.class);
        renderer.setOut(bout);
        injector.getInstance(InjectorGrapher.class)
                .of(gameInjector)
                .graph();
    }
    try (PrintWriter out = new PrintWriter(
            new File(filename), "UTF-8")) {
        String s = baos.toString("UTF-8");
        s = fixGrapherBug(s);
        s = hideClassPaths(s);
        out.write(s);
    }

}
 
开发者ID:devnewton,项目名称:jnuit,代码行数:20,代码来源:GameGraphGenerator.java

示例4: main

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
  // TODO(phopkins): Switch to Stage.TOOL when issue 297 is fixed.
  Injector demoInjector =
      Guice.createInjector(
          Stage.DEVELOPMENT,
          new BackToTheFutureModule(),
          new MultibinderModule(),
          new PrivateTestModule());
  PrintWriter out = new PrintWriter(new File(args[0]), "UTF-8");

  Injector injector = Guice.createInjector(new GraphvizModule());
  GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
  grapher.setOut(out);
  grapher.setRankdir("TB");
  grapher.graph(demoInjector);
}
 
开发者ID:google,项目名称:guice,代码行数:17,代码来源:InjectorGrapherDemo.java

示例5: writeGraph

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
public void writeGraph(File file, Injector injector) throws IOException {
    final PrintWriter out = new PrintWriter(file, Charsets.UTF_8.name());
    final GraphvizGrapher grapher = Guice.createInjector(new GraphvizModule()).getInstance(GraphvizGrapher.class);

    grapher.setOut(out);
    grapher.setRankdir("TB");
    grapher.graph(injector);
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:9,代码来源:Grapher.java

示例6: writeDotFile

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
private static void writeDotFile(String filename, Injector demoInjector) throws IOException {
    PrintWriter out = new PrintWriter(new File(filename), "UTF-8");

    com.google.inject.Injector injector = Guice.createInjector(new GraphvizModule());
    GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
    grapher.setOut(out);
    grapher.setRankdir("TB");
    grapher.graph(demoInjector);
}
 
开发者ID:peerdavid,项目名称:ComeAndGo,代码行数:10,代码来源:Architecture.java

示例7: graph

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
private static void graph(String filename, Injector demoInjector) throws IOException {
	PrintWriter out = new PrintWriter(new File(filename), "UTF-8");

	Injector injector = Guice.createInjector(new GrapherModule(), new GraphvizModule());
	GraphvizRenderer renderer = injector.getInstance(GraphvizRenderer.class);
	renderer.setOut(out).setRankdir("TB");

	injector.getInstance(InjectorGrapher.class).of(demoInjector).graph();
}
 
开发者ID:mnikliborc,项目名称:clicktrace,代码行数:10,代码来源:GuiceGrapher.java

示例8: graph

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
public void graph(String filename, Injector demoInjector) throws IOException {
    PrintWriter out = new PrintWriter(new File(filename), Charsets.UTF_8.name());

    Injector injector = Guice.createInjector(new GraphvizModule());
    GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
    grapher.setOut(out);
    grapher.setRankdir("TB");
    grapher.graph(demoInjector);
}
 
开发者ID:naver,项目名称:pinpoint,代码行数:10,代码来源:DependencyGraph.java

示例9: graph

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
public void graph(String filename, Injector demoInjector) throws IOException {
    PrintWriter out = new PrintWriter(new File(filename), Charsets.UTF_8_NAME);

    Injector injector = Guice.createInjector(new GraphvizModule());
    GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
    grapher.setOut(out);
    grapher.setRankdir("TB");
    grapher.graph(demoInjector);
}
 
开发者ID:naver,项目名称:pinpoint,代码行数:10,代码来源:Grapher.java

示例10: main

import com.google.inject.grapher.graphviz.GraphvizModule; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
  // TODO(phopkins): Switch to Stage.TOOL when issue 297 is fixed.
  Injector demoInjector = Guice.createInjector(Stage.DEVELOPMENT,
      new BackToTheFutureModule(), new MultibinderModule(), new PrivateTestModule());
  PrintWriter out = new PrintWriter(new File(args[0]), "UTF-8");

  Injector injector = Guice.createInjector(new GraphvizModule());
  GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
  grapher.setOut(out);
  grapher.setRankdir("TB");
  grapher.graph(demoInjector);
}
 
开发者ID:cgruber,项目名称:guice-old,代码行数:13,代码来源:InjectorGrapherDemo.java


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