/** * Create a parser that can deal with options and parses certain args. * * @param args * the args, typically that passed to the * <code>public static void main(String[] args)</code> method. * @param optionDescriptors * the option descriptors * @param control * the parser control used determine behaviour of parser */ public CLArgsParser(String[] args, CLOptionDescriptor[] optionDescriptors, ParserControl control) { m_optionDescriptors = optionDescriptors; m_control = control; m_options = new List<CLOption>(); m_args = args; try { Parse(); CheckIncompatibilities(m_options); BuildOptionIndex(); } catch (Exception pe) { m_errorMessage = pe.Message; } // System.out.println( "Built : " + m_options ); // System.out.println( "From : " + Arrays.asList( args ) ); }
/** * Create a parser that can deal with options and parses certain args. * * @param args * the args, typically that passed to the * <code>public static void main(String[] args)</code> method. * @param optionDescriptors * the option descriptors * @param control * the parser control used determine behaviour of parser */ public CLArgsParser(String[] args, CLOptionDescriptor[] optionDescriptors, ParserControl control) { m_optionDescriptors = optionDescriptors; m_control = control; m_options = new List <CLOption>(); m_args = args; try { Parse(); CheckIncompatibilities(m_options); BuildOptionIndex(); } catch (Exception pe) { m_errorMessage = pe.Message; } // System.out.println( "Built : " + m_options ); // System.out.println( "From : " + Arrays.asList( args ) ); }