001package net.gdface.codegen.thrift; 002 003import net.gdface.codegen.generator.GeneratorOptions; 004import org.apache.commons.cli.Option; 005 006/** 007 * @author guyadong 008 * 009 */ 010public class ThriftServiceDecoratorOptions extends GeneratorOptions implements ThriftConstants{ 011 private final static ThriftServiceDecoratorOptions instance = new ThriftServiceDecoratorOptions(); 012 013 protected ThriftServiceDecoratorOptions() { 014 super(); 015 options.addOption(Option.builder(INTERFACE_CLASS_OPTION).longOpt(INTERFACE_CLASS_OPTION_LONG) 016 .desc("interface classes,splited with [,]without blank space,must maped with -rc") 017 .argName("className,..,className").numberOfArgs(1).required().build()); 018 options.addOption(Option.builder(REFERENCE_CLASS_OPTION).longOpt(REFERENCE_CLASS_OPTION_LONG) 019 .desc("reference classes,splited with [,]without blank space,must maped with -ic") 020 .argName("className,..,className").numberOfArgs(1).build()); 021 options.addOption(Option.builder(TASK_TYPE_OPTION).longOpt(TASK_TYPE_OPTION_LONG) 022 .desc(TASK_TYPE_OPTION_DESC).numberOfArgs(1).required().build()); 023 options.addOption(Option.builder().longOpt(THRIFT_CLIENT_PKG_OPTION_LONG) 024 .desc(THRIFT_CLIENT_PKG_OPTION_DESC).numberOfArgs(1).build()); 025 options.addOption(Option.builder(LANGUAGE_OPTION).longOpt(LANGUAGE_OPTION_LONG) 026 .desc(LANGUAGE_OPTION_DESC).numberOfArgs(1).build()); 027 options.addOption(Option.builder(CONFIG_OPTION).longOpt(CONFIG_OPTION_LONG) 028 .desc(CONFIG_OPTION_DESC).numberOfArgs(1).build()); 029 } 030 031 /** 032 * @return instance 033 */ 034 public static ThriftServiceDecoratorOptions getInstance() { 035 return instance; 036 } 037 038 039}