/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Configure the output based on the command line options.
* <p>
* Also determine the length of the command line option. For example,
* for a option "-header" there will be a string argument associated, then the
* the length of option "-header" is two. But for option "-nohelp" no argument
* is needed so it's length is 1.
* </p>
* <p>
* Also do the error checking on the options used. For example it is illegal to
* use "-helpfile" option when already "-nohelp" option is used.
* </p>
*
* @author Robert Field.
* @author Atul Dambalkar.
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
*/
/**
* The build date. Note: For now, we will use
* a version number instead of a date.
*/
/**
* The name of the constant values file.
*/
/**
* Argument for command line option "-header".
*/
/**
* Argument for command line option "-packagesheader".
*/
/**
* Argument for command line option "-footer".
*/
/**
* Argument for command line option "-doctitle".
*/
/**
* Argument for command line option "-windowtitle".
*/
/**
* Argument for command line option "-top".
*/
/**
* Argument for command line option "-bottom".
*/
/**
* Argument for command line option "-helpfile".
*/
/**
* Argument for command line option "-stylesheetfile".
*/
/**
* Argument for command line option "-Xdocrootparent".
*/
/**
* True if command line option "-nohelp" is used. Default value is false.
*/
public boolean nohelp = false;
/**
* True if command line option "-splitindex" is used. Default value is
* false.
*/
public boolean splitindex = false;
/**
* False if command line option "-noindex" is used. Default value is true.
*/
public boolean createindex = true;
/**
* True if command line option "-use" is used. Default value is false.
*/
public boolean classuse = false;
/**
* False if command line option "-notree" is used. Default value is true.
*/
public boolean createtree = true;
/**
* True if command line option "-nodeprecated" is used. Default value is
* false.
*/
public boolean nodeprecatedlist = false;
/**
* True if command line option "-nonavbar" is used. Default value is false.
*/
public boolean nonavbar = false;
/**
* True if command line option "-nooverview" is used. Default value is
* false
*/
private boolean nooverview = false;
/**
* True if command line option "-overview" is used. Default value is false.
*/
public boolean overview = false;
/**
* This is true if option "-overview" is used or option "-overview" is not
* used and number of packages is more than one.
*/
public boolean createoverview = false;
/**
* Unique Resource Handler for this package.
*/
/**
* First file to appear in the right-hand frame in the generated
* documentation.
*/
/**
* The classdoc for the class file getting generated.
*/
// ClassWriter.
/**
* Constructor. Initialises resource for the
* {@link com.sun.tools.doclets.MessageRetriever}.
*/
private ConfigurationImpl() {
standardmessage = new MessageRetriever(this,
"com.sun.tools.doclets.formats.html.resources.standard");
}
/**
* Reset to a fresh new ConfigurationImpl, to allow multiple invocations
* of javadoc within a single VM. It would be better not to be using
* static fields at all, but .... (sigh).
*/
public static void reset() {
instance = new ConfigurationImpl();
}
return instance;
}
/**
* Return the build date for the doclet.
*/
return BUILD_DATE;
}
/**
* Depending upon the command line options provided by the user, set
* configure the output generation environment.
*
* @param options The array of option names and values.
*/
nohelp = true;
splitindex = true;
createindex = false;
classuse = true;
createtree = false;
nodeprecatedlist = true;
nonavbar = true;
nooverview = true;
overview = true;
}
}
}
}
}
}
/**
* Returns the "length" of a given option. If an option takes no
* arguments, its length is one. If it takes one argument, it's
* length is two, and so on. This method is called by JavaDoc to
* parse the options it does not recognize. It then calls
* {@link #validOptions(String[][], DocErrorReporter)} to
* validate them.
* <b>Note:</b><br>
* The options arrive as case-sensitive strings. For options that
* are not case-sensitive, use toLowerCase() on the option string
* before comparing it.
* </blockquote>
*
* @return number of arguments + 1 for a option. Zero return means
* option not known. Negative value means error occurred.
*/
int result = -1;
return result;
}
// otherwise look for the options we have added
return 1;
return 1;
return 2;
} else {
return 0;
}
}
/**
* {@inheritDoc}
*/
boolean helpfile = false;
boolean nohelp = false;
boolean overview = false;
boolean nooverview = false;
boolean splitindex = false;
boolean noindex = false;
// check shared options
return false;
}
// otherwise look at our options
if (nohelp == true) {
"-helpfile", "-nohelp"));
return false;
}
if (helpfile == true) {
"-helpfile"));
return false;
}
return false;
}
helpfile = true;
if (helpfile == true) {
"-nohelp", "-helpfile"));
return false;
}
nohelp = true;
try {
} catch (MalformedURLException e) {
return false;
}
if (nooverview == true) {
"-overview", "-nooverview"));
return false;
}
if (overview == true) {
"-overview"));
return false;
}
overview = true;
if (overview == true) {
"-nooverview", "-overview"));
return false;
}
nooverview = true;
if (noindex == true) {
"-splitindex", "-noindex"));
return false;
}
splitindex = true;
if (splitindex == true) {
"-noindex", "-splitindex"));
return false;
}
noindex = true;
}
}
return true;
}
/**
* {@inheritDoc}
*/
return standardmessage;
}
/**
* Decide the page which will appear first in the right-hand frame. It will
* be "overview-summary.html" if "-overview" option is used or no
* "-overview" but the number of packages is more than one. It will be
* "package-summary.html" of the respective package if there is only one
* package to document. It will be a class page(first in the sorted order),
* if only classes are provided on the command line.
*
* @param root Root of the program structure.
*/
if (!checkForDeprecation(root)) {
return;
}
if (createoverview) {
} else {
}
} else {
}
}
}
if (!nodeprecated) {
return classarr[0];
}
return classarr[i];
}
}
return null;
}
if (isGeneratedDoc(classarr[i])) {
return true;
}
}
return false;
}
/**
* Generate "overview.html" page if option "-overview" is used or number of
* packages is more than one. Sets {@link #createoverview} field to true.
*/
protected void setCreateOverview() {
createoverview = true;
}
}
/**
* {@inheritDoc}
*/
return new WriterFactoryImpl(this);
}
/**
* {@inheritDoc}
*/
return null;
}
/**
* {@inheritDoc}
*/
else
return Locale.getDefault();
}
}