src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
37 * 37 *
38 * @author Bhakti Mehta 38 * @author Bhakti Mehta
39 */ 39 */
40 public class Options { 40 public class Options {
41 41
42 public static final String DISABLE_XML_SECURITY = "-disableXmlSecurity";
43
42 // honor CLASSPATH environment variable, but it will be overrided by -cp 44 // honor CLASSPATH environment variable, but it will be overrided by -cp
43 public String classpath = System.getenv("CLASSPATH"); 45 public String classpath = System.getenv("CLASSPATH");
44 46
45 public File targetDir = null; 47 public File targetDir = null;
46 48
47 public File episodeFile = null; 49 public File episodeFile = null;
50
51 private boolean disableXmlSecurity = false;
48 52
49 // encoding is not required for JDK5, 6, but JDK 7 javac is much more strict - see issue 6859289 53 // encoding is not required for JDK5, 6, but JDK 7 javac is much more strict - see issue 6859289
50 public String encoding = null; 54 public String encoding = null;
51 55
52 public final List<String> arguments = new ArrayList<String>(); 56 public final List<String> arguments = new ArrayList<String>();
83 (Messages.OPERAND_MISSING.format(args[i]))); 87 (Messages.OPERAND_MISSING.format(args[i])));
84 episodeFile = new File(args[++i]); 88 episodeFile = new File(args[++i]);
85 return 1; 89 return 1;
86 } 90 }
87 91
92 if (args[i].equals(DISABLE_XML_SECURITY)) {
93 if (i == args.length - 1)
94 throw new BadCommandLineException(
95 (Messages.OPERAND_MISSING.format(args[i])));
96 disableXmlSecurity = true;
97 return 1;
98 }
99
88 if (args[i].equals("-encoding")) { 100 if (args[i].equals("-encoding")) {
89 if (i == args.length - 1) 101 if (i == args.length - 1)
90 throw new BadCommandLineException( 102 throw new BadCommandLineException(
91 (Messages.OPERAND_MISSING.format(args[i]))); 103 (Messages.OPERAND_MISSING.format(args[i])));
92 encoding = args[++i]; 104 encoding = args[++i];
104 116
105 return 0; 117 return 0;
106 118
107 } 119 }
108 120
121 /**
122 * @return the disableXmlSecurity
123 */
124 public boolean isDisableXmlSecurity() {
125 return disableXmlSecurity;
126 }
127
128
109 129
110 } 130 }

mercurial