Package com.getperka.flatpack

Examples of com.getperka.flatpack.Unpacker


          defaultValue = DEFAULT_URI) URI source,
      @Flag(tag = "dialect", help = "The source dialect to use", defaultValue = "js") String dialect,
      @Flag(tag = "out", help = "The directory to generate source into", defaultValue = ".") File out)
      throws IOException {

    Unpacker unpacker = FlatPack.create(new Configuration()
        .addTypeSource(new SearchTypeSource("com.getperka.flatpack")))
        .getUnpacker();

    logger.info("Retrieving {}", source);
    Reader reader = new InputStreamReader(source.toURL().openStream(), Charset.forName("UTF8"));

    ApiDescription api = unpacker.<ApiDescription> unpack(ApiDescription.class, reader, null)
        .getValue();
    logger.info("Retrieved API description with {} entities and {} endpoints", api.getEntities()
        .size(), api.getEndpoints().size());

    ServiceLoader<Dialect> loader = ServiceLoader.load(Dialect.class);
View Full Code Here

TOP

Related Classes of com.getperka.flatpack.Unpacker

Copyright © 2018 www.massapicom. 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.