protected void parseArguments(String[] args, Listener listener, Receiver receiver) throws BadCommandLineException { options.parseArguments(args); options.validate(); if (options.debugMode) listener.enableDebugging(); options.parseBindings(receiver); }
protected void parseArguments(String[] args, Listener listener, Receiver receiver) throws BadCommandLineException { options.parseArguments(args); options.validate(); if (options.debugMode) listener.enableDebugging(); options.parseBindings(receiver); }
protected void parseArguments(String[] args, Listener listener, Receiver receiver) throws BadCommandLineException { options.parseArguments(args); options.validate(); if (options.debugMode) listener.enableDebugging(); options.parseBindings(receiver); }
protected void parseArguments(String[] args, Listener listener, Receiver receiver) throws BadCommandLineException { options.parseArguments(args); options.validate(); if (options.debugMode) listener.enableDebugging(); options.parseBindings(receiver); }
throw new BadCommandLineException(); if (args[i].charAt(0) == '-') { int j = parseArguments(args,i); if(j==0) throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i]));
throw new BadCommandLineException(); if (args[i].charAt(0) == '-') { int j = parseArguments(args,i); if(j==0) throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i]));
throw new BadCommandLineException(); if (args[i].charAt(0) == '-') { int j = parseArguments(args,i); if(j==0) throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i]));
throw new BadCommandLineException(); if (args[i].charAt(0) == '-') { int j = parseArguments(args,i); if(j==0) throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i]));
/** * Test of parseArguments(String[]) method, of class WsimportOptions. */ public void testParseArgument_javacArgs() throws Exception { WsimportOptions options = new WsimportOptions(); String[] args = new String[] {"-g", "-J-g", "-J-source=1.6", "-J-target=1.6", "-J-XprintRounds"}; options.parseArguments(args); assertFalse("javac options not set", options.javacOptions.isEmpty()); assertEquals("invalid option recognized", 4, options.javacOptions.size()); L l = new L(); List<String> jopts = options.getJavacOptions(new ArrayList<String>(){{add("-g");}}, l); assertEquals("incorrect split of javac options", 5, jopts.size()); assertTrue(jopts.remove("-source")); assertTrue(jopts.remove("1.6")); assertTrue(jopts.remove("-target")); assertTrue(jopts.remove("1.6")); assertTrue(jopts.remove("-XprintRounds")); assertTrue(jopts.isEmpty()); assertEquals(1, l.i); }
WsimportOptions options = new WsimportOptions(); SchemaCompiler sc = options.getSchemaCompiler(); options.parseArguments(new String[0]); assertNull("ws encoding set", options.encoding); assertNull("xjc encoding set", sc.getOptions().encoding); sc = options.getSchemaCompiler(); String[] args = {"-encoding", "UTF-8"}; options.parseArguments(args); assertNotNull("ws encoding not set", options.encoding); assertEquals("UTF-8", options.encoding); sc = options.getSchemaCompiler(); args = new String[] {"-encoding", "UTF-8", "-B-encoding", "UTF-16"}; options.parseArguments(args); assertNotNull("ws encoding not set", options.encoding); assertEquals("UTF-8", options.encoding); sc = options.getSchemaCompiler(); args = new String[] {"-B-encoding", "UTF-16"}; options.parseArguments(args); assertNull("ws encoding set", options.encoding); assertNotNull("xjc encoding not set", sc.getOptions().encoding);