FreeHEP API
Version current

org.freehep.tools.doclet
Class ConfigurationStandard

java.lang.Object
  extended bycom.sun.tools.doclets.Configuration
      extended byorg.freehep.tools.doclet.ConfigurationStandard

public class ConfigurationStandard
extends com.sun.tools.doclets.Configuration

Configure the output based on the command line options.

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.

Also do the error checking on the options used. For example it is illegal to use "-helpfile" option when already "-nohelp" option is used.

Author:
Robert Field., Atul Dambalkar., Jamie Ho
Source Code:
ConfigurationStandard.java

Field Summary
 String baseurl
          //MD Re-added baseurl for sourcelinks
 String bottom
          Argument for command line option "-bottom".
 boolean classuse
          True if command line option "-use" is used.
static String CONSTANTS_FILE_NAME
          The name of the constant values file.
 boolean createindex
          False if command line option "-noindex" is used.
 boolean createoverview
          This is true if option "-overview" is used or option "-overview" is not used and number of packages is more than one.
 boolean createtree
          False if command line option "-notree" is used.
 com.sun.javadoc.ClassDoc currentcd
          The classdoc for the class file getting generated.
 String doctitle
          Argument for command line option "-doctitle".
 Extern extern
          The tracker of external package links (sole-instance).
 String footer
          Argument for command line option "-footer".
 Group group
          The package grouping sole-instance.
 String header
          Argument for command line option "-header".
 String helpfile
          Argument for command line option "-helpfile".
 boolean keywords
          True if user want to add member names as meta keywords.
 MetaKeywords metakeywords
          The meta tag keywords sole-instance.
 boolean nocomment
          True if user wants to suppress descriptions and tags.
 boolean nodeprecatedlist
          True if command line option "-nodeprecated" is used.
 boolean nohelp
          True if command line option "-nohelp" is used.
 boolean nonavbar
          True if command line option "-nonavbar" is used.
 boolean notimestamp
          True if user wants to suppress time stamp in output.
 boolean overview
          True if command line option "-overview" is used.
 String packagesheader
          Argument for command line option "-packagesheader".
 boolean printedVersion
          True if version id has been printed
 boolean quiet
          True if running in quiet mode
 boolean serialwarn
          This is true if option "-serialwarn" is used.
 boolean splitindex
          True if command line option "-splitindex" is used.
 com.sun.tools.doclets.MessageRetriever standardmessage
          Unique Resource Handler for this package.
 String stylesheetfile
          Argument for command line option "-stylesheetfile".
 TagletManager tagletManager
          The taglet manager.
 String tagletpath
          The path to Taglets
 String topFile
          First file to appear in the right-hand frame in the generated documentation.
 String windowtitle
          Argument for command line option "-windowtitle".
 
Fields inherited from class com.sun.tools.doclets.Configuration
charset, classDocCatalog, copydocfilesubdirs, DEFAULT_TAB_STOP_LENGTH, destdirname, docencoding, encoding, excludedDocFileDirs, excludedQualifiers, genSrc, linksourcetab, message, nodate, nodeprecated, nosince, packages, root, showauthor, showversion, SOURCE_OUTPUT_DIR_NAME, sourcepath
 
Constructor Summary
ConfigurationStandard()
          Constructor.
 
Method Summary
protected  boolean checkForDeprecation(com.sun.javadoc.RootDoc root)
           
protected  com.sun.javadoc.ClassDoc getValidClass(com.sun.javadoc.ClassDoc[] classarr)
           
 boolean isGeneratedDoc(com.sun.javadoc.Doc doc)
          Return true if the doc element is getting documented, depending upon -nodeprecated option and @deprecated tag used.
 int optionLength(String option)
          Returns the "length" of a given option.
protected  void setCreateOverview()
          Generate "overview.html" page if option "-overview" is used or number of packages is more than one.
 void setSpecificDocletOptions(com.sun.javadoc.RootDoc root)
          Depending upon the command line options provided by the user, set configure the output generation environment.
protected  void setTopFile(com.sun.javadoc.RootDoc root)
          Decide the page which will appear first in the right-hand frame.
 boolean validOptions(String[][] options, com.sun.javadoc.DocErrorReporter reporter)
          After parsing the available options using optionLength(String), JavaDoc invokes this method with an array of options-arrays, where the first item in any array is the option, and subsequent items in that array are its arguments.
 
Methods inherited from class com.sun.tools.doclets.Configuration
addToSet, checkOutputFileEncoding, generalOptionLength, generalValidOptions, getClassName, setOptions, shouldExcludeDocFileDir, shouldExcludeQualifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTANTS_FILE_NAME

public static final String CONSTANTS_FILE_NAME
The name of the constant values file.

See Also:
Constant Field Values

tagletManager

public TagletManager tagletManager
The taglet manager.


tagletpath

public String tagletpath
The path to Taglets


nocomment

public boolean nocomment
True if user wants to suppress descriptions and tags.


notimestamp

public boolean notimestamp
True if user wants to suppress time stamp in output.


keywords

public boolean keywords
True if user want to add member names as meta keywords. Set to false because meta keywords are ignored in general by most Internet search engines.


header

public String header
Argument for command line option "-header".


packagesheader

public String packagesheader
Argument for command line option "-packagesheader".


footer

public String footer
Argument for command line option "-footer".


doctitle

public String doctitle
Argument for command line option "-doctitle".


windowtitle

public String windowtitle
Argument for command line option "-windowtitle".


bottom

public String bottom
Argument for command line option "-bottom".


helpfile

public String helpfile
Argument for command line option "-helpfile".


baseurl

public String baseurl
//MD Re-added baseurl for sourcelinks


stylesheetfile

public String stylesheetfile
Argument for command line option "-stylesheetfile".


nohelp

public boolean nohelp
True if command line option "-nohelp" is used. Default value is false.


splitindex

public boolean splitindex
True if command line option "-splitindex" is used. Default value is false.


createindex

public boolean createindex
False if command line option "-noindex" is used. Default value is true.


classuse

public boolean classuse
True if command line option "-use" is used. Default value is false.


createtree

public boolean createtree
False if command line option "-notree" is used. Default value is true.


nodeprecatedlist

public boolean nodeprecatedlist
True if command line option "-nodeprecated" is used. Default value is false.


nonavbar

public boolean nonavbar
True if command line option "-nonavbar" is used. Default value is false.


overview

public boolean overview
True if command line option "-overview" is used. Default value is false.


createoverview

public boolean createoverview
This is true if option "-overview" is used or option "-overview" is not used and number of packages is more than one.


serialwarn

public boolean serialwarn
This is true if option "-serialwarn" is used. Defualt value is false to supress excessive warnings about serial tag.


standardmessage

public final com.sun.tools.doclets.MessageRetriever standardmessage
Unique Resource Handler for this package.


topFile

public String topFile
First file to appear in the right-hand frame in the generated documentation.


currentcd

public com.sun.javadoc.ClassDoc currentcd
The classdoc for the class file getting generated.


extern

public final Extern extern
The tracker of external package links (sole-instance).


group

public final Group group
The package grouping sole-instance.


metakeywords

public final MetaKeywords metakeywords
The meta tag keywords sole-instance.


quiet

public boolean quiet
True if running in quiet mode


printedVersion

public boolean printedVersion
True if version id has been printed

Constructor Detail

ConfigurationStandard

public ConfigurationStandard()
Constructor. Initialises resource for the MessageRetriever.

Method Detail

setSpecificDocletOptions

public void setSpecificDocletOptions(com.sun.javadoc.RootDoc root)
Depending upon the command line options provided by the user, set configure the output generation environment.

Parameters:
root - Used to retrieve used comand line options.

optionLength

public int optionLength(String option)
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 validOptions(String[][], DocErrorReporter) to validate them. Note:
The options arrive as case-sensitive strings. For options that are not case-sensitive, use toLowerCase() on the option string before comparing it.

Returns:
number of arguments + 1 for a option. Zero return means option not known. Negative value means error occurred.

validOptions

public boolean validOptions(String[][] options,
                            com.sun.javadoc.DocErrorReporter reporter)
After parsing the available options using optionLength(String), JavaDoc invokes this method with an array of options-arrays, where the first item in any array is the option, and subsequent items in that array are its arguments. So, if -print is an option that takes no arguments, and -copies is an option that takes 1 argument, then
     -print -copies 3
 
produces an array of arrays that looks like:
      option[0][0] = -print
      option[1][0] = -copies
      option[1][1] = 3
 
(By convention, command line switches start with a "-", but they don't have to.) This method is not required to be written by sub-classes and will default gracefully (to true) if absent.

Printing option related error messages (using the provided DocErrorReporter) is the responsibility of this method.

Note: This is invoked on a temporary config, no side-effect settings will persist.

Parameters:
options - Options used on the command line.
reporter - Error reporter to be used.
Returns:
true if all the options are valid.

setTopFile

protected void setTopFile(com.sun.javadoc.RootDoc root)
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.

Parameters:
root - Root of the program structure.

getValidClass

protected com.sun.javadoc.ClassDoc getValidClass(com.sun.javadoc.ClassDoc[] classarr)

checkForDeprecation

protected boolean checkForDeprecation(com.sun.javadoc.RootDoc root)

setCreateOverview

protected void setCreateOverview()
Generate "overview.html" page if option "-overview" is used or number of packages is more than one. Sets createoverview field to true.


isGeneratedDoc

public boolean isGeneratedDoc(com.sun.javadoc.Doc doc)
Return true if the doc element is getting documented, depending upon -nodeprecated option and @deprecated tag used. Return true if -nodeprecated is not used or @deprecated tag is not used.


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.