private CommandLine addOptions(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ParseException {
        Class cla = properties.getClass();
        Field[] fields = cla.getDeclaredFields();
        for(Field field:fields){
            String name = field.getName();
            OptionRequired optionRequired = field.getAnnotation(OptionRequired.class);
            if(optionRequired != null){
                options.addOption(name,optionRequired.hasArg(),optionRequired.description());
            }
        }
        CommandLine cl = parser.parse(options, args);
        return cl;
    }
The Parser of Launcher commandline options

Company: www.dtstack.com
@author sishu.yss
core/src/main/java/com/dtstack/flink/sql/option/OptionParser.java