001package net.gdface.codegen.webclient; 002 003import net.gdface.cli.Context; 004 005public class RPCClientGenerator extends WebClientGenerator { 006 public static void main(String[] args) { 007 new RPCClientGenerator().parseCommandLine(args).initEngine().generate(); 008 } 009 010 011 @SuppressWarnings({ "unchecked", "rawtypes" }) 012 @Override 013 protected Context createEngineContext() { 014 Context context = super.createEngineContext(); 015 RPCClient newSourceInfo = new RPCClient(config.getInterfaceClass(), config.getRefClass(), 016 config.getServiceClass()); 017 if (!newSourceInfo.compile()) 018 System.exit(1); 019 context.setProperty(SOURCE_INFO, newSourceInfo); 020 return context; 021 } 022 023}