/* * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * 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. */ package jdk.javadoc.internal.doclets.formats.html; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import com.sun.tools.doclint.DocLint; import jdk.javadoc.doclet.Doclet; import jdk.javadoc.doclet.Reporter; import jdk.javadoc.internal.doclets.toolkit.BaseOptions; import jdk.javadoc.internal.doclets.toolkit.Resources; import jdk.javadoc.internal.doclets.toolkit.util.DocFile; import jdk.javadoc.internal.doclets.toolkit.util.Utils; import static javax.tools.Diagnostic.Kind.ERROR; import static javax.tools.Diagnostic.Kind.WARNING; /** * Storage for all options supported by the * {@link jdk.javadoc.doclet.StandardDoclet standard doclet}, * including the format-independent options handled * by {@link BaseOptions}. * *

Some of the methods used to access the values of options * have names that begin with a verb, such as {@link #createOverview} * or {@link #splitIndex}. Unless otherwise stated, * these methods should all be taken as just accessing the value * of the associated option. * */ public class HtmlOptions extends BaseOptions { // /** * Argument for command-line option {@code --add-stylesheet}. */ private List additionalStylesheets = new ArrayList<>(); /** * Argument for command-line option {@code -bottom}. */ private String bottom = ""; /** * Argument for command-line option {@code -charset}. * The META charset tag used for cross-platform viewing. */ private String charset = null; /** * Argument for command-line option {@code -use}. * True if command-line option "-use" is used. Default value is false. */ private boolean classUse = false; /** * Argument for command-line option {@code -noindex}. * False if command-line option "-noindex" is used. Default value is true. */ private boolean createIndex = true; /** * Argument for command-line option {@code -overview}. * This is true if option "-overview" is used or option "-overview" is not * used and number of packages is more than one. */ private boolean createOverview = false; /** * Argument for command-line option {@code -notree}. * False if command-line option "-notree" is used. Default value is true. */ private boolean createTree = true; /** * Arguments for command-line option {@code -Xdoclint} and friends. * Collected set of doclint options. */ private List doclintOpts = new ArrayList<>(); /** * Argument for command-line option {@code -Xdocrootparent}. */ private String docrootParent = ""; /** * Argument for command-line option {@code -doctitle}. */ private String docTitle = ""; /** * Argument for command-line option {@code -footer}. */ private String footer = ""; /** * Argument for command-line option {@code -header}. */ private String header = ""; /** * Argument for command-line option {@code -helpfile}. */ private String helpFile = ""; /** * Argument for command-line option {@code -nodeprecated}. * True if command-line option "-nodeprecated" is used. Default value is * false. */ private boolean noDeprecatedList = false; /** * Argument for command-line option {@code -nohelp}. * True if command-line option "-nohelp" is used. Default value is false. */ private boolean noHelp = false; /** * Argument for command-line option {@code -nonavbar}. * True if command-line option "-nonavbar" is used. Default value is false. */ private boolean noNavbar = false; /** * Argument for command-line option {@code -nooverview}. * True if command-line option "-nooverview" is used. Default value is * false */ private boolean noOverview = false; /** * Argument for command-line option {@code -overview}. * The overview path specified with "-overview" flag. */ private String overviewPath = null; /** * Argument for command-line option {@code -packagesheader}. */ private String packagesHeader = ""; /** * Argument for command-line option {@code -splitindex}. * True if command-line option "-splitindex" is used. Default value is * false. */ private boolean splitIndex = false; /** * Argument for command-line option {@code -stylesheetfile}. */ private String stylesheetFile = ""; /** * Argument for command-line option {@code -top}. */ private String top = ""; /** * Argument for command-line option {@code -windowtitle}. */ private String windowTitle = ""; // private HtmlConfiguration config; HtmlOptions(HtmlConfiguration config) { super(config); this.config = config; } @Override public Set getSupportedOptions() { Resources resources = config.getResources(); Reporter reporter = config.getReporter(); List