Search in sources :

Example 1 with InterfaceType

use of com.linkedin.restli.internal.server.model.ResourceMethodDescriptor.InterfaceType in project rest.li by linkedin.

the class GreetingsResourceCodeGenerator method main.

/**
   * @param args
   *          template, interface type, suffix, use ParSeq context
   * @throws ClassNotFoundException
   */
public static void main(final String[] args) throws ClassNotFoundException, FileNotFoundException {
    // want a hard failure if something goes wrong, so gradle stops
    if (args.length != 5)
        throw new IllegalArgumentException("Bad arguments to code generator");
    final PrintStream outputStream = new PrintStream(new File(args[0]));
    final Class<?> template = Class.forName(args[1]);
    final InterfaceType type = InterfaceType.valueOf(args[2]);
    final String suffix = args[3];
    final boolean useParSeqCtx = Boolean.valueOf(args[4]);
    final GreetingsResourceCodeGenerator gen = new GreetingsResourceCodeGenerator(template, type, suffix, useParSeqCtx);
    gen.printAll(outputStream);
}
Also used : PrintStream(java.io.PrintStream) InterfaceType(com.linkedin.restli.internal.server.model.ResourceMethodDescriptor.InterfaceType) File(java.io.File)

Aggregations

InterfaceType (com.linkedin.restli.internal.server.model.ResourceMethodDescriptor.InterfaceType)1 File (java.io.File)1 PrintStream (java.io.PrintStream)1