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


Java Help类代码示例

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


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

示例1: cli

import io.airlift.airline.Help; //导入依赖的package包/类
private static Cli<Runnable> cli() {
  final CliBuilder<Runnable> builder = Cli.builder("grpc-proxy");

  builder
      .withDescription("A set of example services for testing a gRPC proxy service.")
      .withDefaultCommand(Help.class)
      .withCommand(Help.class)
      .withCommand(HelloWorldClient.Cmd.class);

  builder
      .withGroup("server")
      .withDescription("Run a server")
      .withDefaultCommand(Help.class)
      .withCommand(Help.class)
      .withCommand(ProxyRpcServer.Cmd.class)
      .withCommand(LegacyHttpServer.Cmd.class)
      .withCommand(HelloWorldServer.Cmd.class);

  return builder.build();
}
 
开发者ID:codahale,项目名称:grpc-proxy,代码行数:21,代码来源:Runner.java

示例2: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args) throws IOException {
    configureInMemoryLogging();

    // argument parsing
    io.airlift.airline.Cli.CliBuilder<Runnable> builder = io.airlift.airline.Cli.<Runnable>builder("eq3")
            .withCommands(Help.class, Info.class, Discover.class, Version.class, Boost.class, Holiday.class)
            .withDescription("Tool to manage Max!EQ3 cubes from the command line")
            .withDefaultCommand(Help.class);

    builder.withGroup("report")
            .withDescription("Reporting to a configurable backend")
            .withCommands(ReportCli.class)
            .withDefaultCommand(Help.class);

    io.airlift.airline.Cli<Runnable> gitParser = builder.build();
    gitParser.parse(args).run();

    // some parts do not exit correctly or daemon thread, this is why we need to call System.exit here
    System.exit(0);
}
 
开发者ID:spinscale,项目名称:maxcube-java,代码行数:21,代码来源:Cli.java

示例3: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
    @SuppressWarnings("unchecked")
    Cli.CliBuilder<Runnable> builder = Cli.<Runnable>builder("graphql-codegen")
            .withDescription("GraphQL code generator CLI.")
            .withDefaultCommand(Help.class)
            .withCommands(
                    Langs.class,
                    Help.class
            );

    builder.withGroup("generate")
            .withDescription("Generate code in chosen lang")
            .withDefaultCommand(GenerateJava.class)
            .withCommand(GenerateJava.class);

    builder.build().parse(args).run();
}
 
开发者ID:tinnou,项目名称:graphql-codegen,代码行数:18,代码来源:Main.java

示例4: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args)
        throws Exception
{
    TestingPrestoServerLauncher launcher = singleCommand(TestingPrestoServerLauncher.class).parse(args);
    if (launcher.helpOption.showHelpIfRequested()) {
        return;
    }
    try {
        launcher.validateOptions();
    }
    catch (IllegalStateException e) {
        System.out.println("ERROR: " + e.getMessage());
        System.out.println();
        Help.help(launcher.commandMetadata);
        return;
    }
    launcher.run();
}
 
开发者ID:y-lan,项目名称:presto,代码行数:19,代码来源:TestingPrestoServerLauncher.java

示例5: doMain

import io.airlift.airline.Help; //导入依赖的package包/类
boolean doMain(String[] args) {
  Cli.CliBuilder<Runnable> builder = Cli.<Runnable>builder("streamsets jks-cs")
      .withDescription("StreamSets Data Collector Java Keystore Credentials Store CLI")
      .withDefaultCommand(Help.class)
      .withCommands(
          Help.class,
          ListCredentialsCommand.class,
          AddCredentialCommand.class,
          DeleteCredentialCommand.class
      );

  try {
    builder.build().parse(args).run();
    return true;
  } catch (Exception ex) {
    if(Arrays.asList(args).contains("--stack")) {
      ex.printStackTrace(System.err);
    } else {
      System.err.println(ex.getMessage());
    }
    return false;
  }
}
 
开发者ID:streamsets,项目名称:datacollector,代码行数:24,代码来源:JavaKeystoreCredentialStoreCli.java

示例6: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args) {
    CliBuilder<Runnable> builder = Cli.<Runnable> builder("proxy")
        .withDefaultCommand(Help.class)
        .withCommand(Help.class)
        .withCommand(ApnsProxyCommand.class)
        .withCommand(FCMProxyCommand.class);

    builder.build().parse(args).run();
}
 
开发者ID:aerogear,项目名称:push-network-proxies,代码行数:10,代码来源:ProxyCLI.java

示例7: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args) {

        String version = Version.readVersionFromResources();
        @SuppressWarnings("unchecked")
        Cli.CliBuilder<Runnable> builder =
                Cli.<Runnable>builder("Swagger-Diff")
                        .withDescription(
                                String.format(
                                        "Swagger Diff CLI (version %s).",
                                        version))
                        .withDefaultCommand(Diff.class)
                        .withCommands(Diff.class, Help.class, Version.class);

        builder.build().parse(args).run();
    }
 
开发者ID:ryandavis84,项目名称:swagger-java-diff-cli,代码行数:16,代码来源:SwaggerDiff.java

示例8: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args) throws RunnerException {
    CliBuilder<Runnable> builder = io.airlift.airline.Cli.<Runnable>builder("bench")
        .withDescription("Benchmark JSON libraries")
        .withDefaultCommand(Help.class)
        .withCommands(Help.class, InfoCommand.class, SerializationCommand.class, DeserializationCommand.class);

    io.airlift.airline.Cli<Runnable> gitParser = builder.build();
    gitParser.parse(args).run();
}
 
开发者ID:fabienrenaud,项目名称:java-json-benchmark,代码行数:10,代码来源:Cli.java

示例9: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args)
        throws Throwable
{
    @SuppressWarnings({"unchecked"})
    Cli.CliBuilder<Runnable> builder = Cli.<Runnable>builder("wava")
            .withDescription("WebAssembly for Java")
            .withDefaultCommand(Help.class)
            .withCommands(
                    Help.class,
                    TranslateCommand.class);

    Cli<Runnable> parser = builder.build();
    parser.parse(args).run();
}
 
开发者ID:wrmsr,项目名称:wava,代码行数:15,代码来源:WavaMainCli.java

示例10: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args)
{
    Cli.CliBuilder<Runnable> builder = Cli.<Runnable> builder("alfclient")
            .withDescription("Sample Alfresco Command Line Client").withDefaultCommand(Help.class)
            .withCommands(Help.class, AlfrescoCommands.infoUser.class)
            .withCommands(Help.class, AlfrescoCommands.listRoot.class);

    Cli<Runnable> gitParser = builder.build();

    gitParser.parse(args).run();
}
 
开发者ID:Alfresco,项目名称:alfresco-client-sdk,代码行数:12,代码来源:AlfrescoCLI.java

示例11: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String args[]) throws Exception {
    Cli.CliBuilder<Runnable> builder = Cli.<Runnable>builder("minijavac")
        .withDescription("A Java compiler for a worse version of Java.")
        .withDefaultCommand(Help.class)
        .withCommands(
            LexCommand.class,
            ParseCommand.class,
            TypecheckCommand.class,
            GenerateCodeCommand.class);
    builder.build().parse(args).run();
}
 
开发者ID:aj-michael,项目名称:minijavac,代码行数:12,代码来源:Minijavac.java

示例12: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args) {

    final CliBuilder<Runnable> builder = Cli.builder("jgql");

    builder.withDescription("GraphQL Toolkit");
    builder.withDefaultCommand(Help.class);

    final List<Class<? extends Runnable>> cmds = new LinkedList<>();

    cmds.add(Help.class);

    cmds.add(ExtractSchema.class);
    cmds.add(GenerateClientCode.class);

    cmds.add(RegistryPush.class);
    cmds.add(RegistryGet.class);
    cmds.add(RegistryMonitor.class);
    cmds.add(RunQuery.class);
    cmds.add(Diff.class);
    cmds.add(TestSchema.class);

    builder.withCommands(cmds);

    final Cli<Runnable> parser = builder.build();

    try {
      parser.parse(args).run();
    } catch (final ParseException e) {
      System.err.print(e.getMessage());
      System.err.println(String.format(".  See '%s help'.", self()));
    }

  }
 
开发者ID:zourzouvillys,项目名称:graphql,代码行数:34,代码来源:CommandLineMain.java

示例13: helpGroup

import io.airlift.airline.Help; //导入依赖的package包/类
protected void helpGroup(String groupName, String commandName) {
   for (CommandGroupMetadata group : global.getCommandGroups()) {
      if (group.getName().equals(groupName)) {
         for (CommandMetadata command : group.getCommands()) {
            if (command.getName().equals(commandName)) {
               Help.help(command);
            }
         }
         break;
      }
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:13,代码来源:Configurable.java

示例14: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args) {
    Cli.CliBuilder<Runnable> builder = Cli.<Runnable>builder("swagger")
            .withDescription("Swagger code generator CLI. More info on swagger.io")
            .withCommands(
                    Generate.class,
                    Help.class
            );

    builder.build().parse(args).run();
}
 
开发者ID:buremba,项目名称:swagger-slate,代码行数:11,代码来源:SlateGenerator.java

示例15: main

import io.airlift.airline.Help; //导入依赖的package包/类
public static void main(String[] args) throws Exception
{
    Cli.<Callable>builder("muckery")
       .withCommands(Help.class, Main.class)
       .withDefaultCommand(Help.class)
       .build()
       .parse(args)
       .call();
}
 
开发者ID:brianm,项目名称:muckery,代码行数:10,代码来源:Main.java


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