1 /*
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.
4 *
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
79
80 /**
81 * Parses an option <code>args[i]</code> and augment
82 * the <code>opt</code> object appropriately, then return
83 * the number of tokens consumed.
84 *
85 * <p>
86 * The callee doesn't need to recognize the option that the
87 * getOptionName method returns.
88 *
89 * <p>
90 * Once a plugin is activated, this method is called
91 * for options that XJC didn't recognize. This allows
92 * a plugin to define additional options to customize
93 * its behavior.
94 *
95 * <p>
96 * Since options can appear in no particular order,
97 * XJC allows sub-options of a plugin to show up before
98 * the option that activates a plugin (one that's returned
99 * by {@link #getOptionName().)
100 *
101 * But nevertheless a {@link Plugin} needs to be activated
102 * to participate in further processing.
103 *
104 * @return
105 * 0 if the argument is not understood.
106 * Otherwise return the number of tokens that are
107 * consumed, including the option itself.
108 * (so if you have an option like "-foo 3", return 2.)
109 * @exception BadCommandLineException
110 * If the option was recognized but there's an error.
111 * This halts the argument parsing process and causes
112 * XJC to abort, reporting an error.
113 */
114 public int parseArgument( Options opt, String[] args, int i ) throws BadCommandLineException, IOException {
115 return 0;
116 }
117
118 /**
119 * Returns the list of namespace URIs that are supported by this plug-in
|
1 /*
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
79
80 /**
81 * Parses an option <code>args[i]</code> and augment
82 * the <code>opt</code> object appropriately, then return
83 * the number of tokens consumed.
84 *
85 * <p>
86 * The callee doesn't need to recognize the option that the
87 * getOptionName method returns.
88 *
89 * <p>
90 * Once a plugin is activated, this method is called
91 * for options that XJC didn't recognize. This allows
92 * a plugin to define additional options to customize
93 * its behavior.
94 *
95 * <p>
96 * Since options can appear in no particular order,
97 * XJC allows sub-options of a plugin to show up before
98 * the option that activates a plugin (one that's returned
99 * by {@link #getOptionName()}.
100 *
101 * But nevertheless a {@link Plugin} needs to be activated
102 * to participate in further processing.
103 *
104 * @return
105 * 0 if the argument is not understood.
106 * Otherwise return the number of tokens that are
107 * consumed, including the option itself.
108 * (so if you have an option like "-foo 3", return 2.)
109 * @exception BadCommandLineException
110 * If the option was recognized but there's an error.
111 * This halts the argument parsing process and causes
112 * XJC to abort, reporting an error.
113 */
114 public int parseArgument( Options opt, String[] args, int i ) throws BadCommandLineException, IOException {
115 return 0;
116 }
117
118 /**
119 * Returns the list of namespace URIs that are supported by this plug-in
|