Klasse CoreJavadocOptions

java.lang.Object
org.gradle.external.javadoc.CoreJavadocOptions
Alle implementierten Schnittstellen:
MinimalJavadocOptions
Bekannte direkte Unterklassen:
StandardJavadocDocletOptions

public abstract class CoreJavadocOptions extends Object implements MinimalJavadocOptions
Provides the core Javadoc Options. That is, provides the options which are not doclet specific.
  • Felddetails

    • optionFile

      protected final org.gradle.external.javadoc.internal.JavadocOptionFile optionFile
    • knownCoreOptionNames

      @Incubating protected final Set<String> knownCoreOptionNames
      Core options which are known, and have corresponding fields in this class.
      Seit:
      7.5
  • Konstruktordetails

    • CoreJavadocOptions

      public CoreJavadocOptions()
    • CoreJavadocOptions

      protected CoreJavadocOptions(org.gradle.external.javadoc.internal.JavadocOptionFile optionFile)
    • CoreJavadocOptions

      protected CoreJavadocOptions(CoreJavadocOptions original, org.gradle.external.javadoc.internal.JavadocOptionFile optionFile)
  • Methodendetails

    • knownOptionNames

      @Incubating public Set<String> knownOptionNames()
      Gets a set of all the options that are known to this class and have separate properties.
      Gibt zurück:
      set of property names
      Seit:
      7.5
    • getOverview

      public String getOverview()
      -overview path\filename

      Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by path/filename and place it on the Overview page (overview-summary.html). The path/filename is relative to the -sourcepath.

      While you can use any name you want for filename and place it anywhere you want for path, a typical thing to do is to name it overview.html and place it in the source tree at the directory that contains the topmost package directories. In this location, no path is needed when documenting packages, since -sourcepath will point to this file. For example, if the source tree for the java.lang package is C:\src\classes\java\lang\, then you could place the overview file at C:\src\classes\overview.html. See Real World Example.

      For information about the file specified by path/filename, see overview comment file.

      Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see HTML Frames.)

      The title on the overview page is set by -doctitle.

      Angegeben von:
      getOverview in Schnittstelle MinimalJavadocOptions
    • setOverview

      public void setOverview(String overview)
      Angegeben von:
      setOverview in Schnittstelle MinimalJavadocOptions
    • overview

      public MinimalJavadocOptions overview(String overview)
      Fluent setter for the overview option.
      Angegeben von:
      overview in Schnittstelle MinimalJavadocOptions
      Parameter:
      overview - The new overview.
      Gibt zurück:
      The MinimalJavadocOptions object.
    • getMemberLevel

      public JavadocMemberLevel getMemberLevel()
      Switch to set the members that should be included in the Javadoc. (-public, -protected, -package, -private)
      Angegeben von:
      getMemberLevel in Schnittstelle MinimalJavadocOptions
    • setMemberLevel

      public void setMemberLevel(JavadocMemberLevel memberLevel)
      Angegeben von:
      setMemberLevel in Schnittstelle MinimalJavadocOptions
    • showFromPublic

      public MinimalJavadocOptions showFromPublic()
      Angegeben von:
      showFromPublic in Schnittstelle MinimalJavadocOptions
    • showFromProtected

      public MinimalJavadocOptions showFromProtected()
      Angegeben von:
      showFromProtected in Schnittstelle MinimalJavadocOptions
    • showFromPackage

      public MinimalJavadocOptions showFromPackage()
      Angegeben von:
      showFromPackage in Schnittstelle MinimalJavadocOptions
    • showFromPrivate

      public MinimalJavadocOptions showFromPrivate()
      Angegeben von:
      showFromPrivate in Schnittstelle MinimalJavadocOptions
    • showAll

      public MinimalJavadocOptions showAll()
      Angegeben von:
      showAll in Schnittstelle MinimalJavadocOptions
    • getDoclet

      public String getDoclet()
      -doclet class

      Specifies the class file that starts the doclet used in generating the documentation. Use the fully-qualified name. This doclet defines the content and formats the output. If the -doclet option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the start(Root) method. The path to this starting class is defined by the -docletpath option.

      For example, to call the MIF doclet, use:

      -doclet com.sun.tools.doclets.mif.MIFDoclet

      For full, working examples of running a particular doclet, see Running the MIF Doclet.

      Angegeben von:
      getDoclet in Schnittstelle MinimalJavadocOptions
    • setDoclet

      public void setDoclet(String doclet)
      Angegeben von:
      setDoclet in Schnittstelle MinimalJavadocOptions
    • doclet

      public MinimalJavadocOptions doclet(String doclet)
      Angegeben von:
      doclet in Schnittstelle MinimalJavadocOptions
    • getDocletpath

      public List<File> getDocletpath()
      -docletpath classpathlist

      Specifies the path to the doclet starting class file (specified with the -doclet option) and any jar files it depends on. If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below. You can specify an absolute path or a path relative to the current directory. If classpathlist contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi-colon (;) on Windows. This option is not necessary if the doclet starting class is already in the search path.

      Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included.

      -docletpath C:/user/mifdoclet/lib/mifdoclet.jar

      Example of path to starting doclet class file. Notice the class filename is omitted.

      -docletpath C:/user/mifdoclet/classes/com/sun/tools/doclets/mif/

      For full, working examples of running a particular doclet, see Running the MIF Doclet.

      Angegeben von:
      getDocletpath in Schnittstelle MinimalJavadocOptions
    • setDocletpath

      public void setDocletpath(List<File> docletpath)
      Angegeben von:
      setDocletpath in Schnittstelle MinimalJavadocOptions
    • docletpath

      public MinimalJavadocOptions docletpath(File... docletpath)
      Angegeben von:
      docletpath in Schnittstelle MinimalJavadocOptions
    • getSource

      public String getSource()
      -source release

      Specifies the version of source code accepted. The following values for release are allowed:

      1.5 javadoc accepts code containing generics and other language features introduced in JDK 1.5.
      The compiler defaults to the 1.5 behavior if the -source flag is not used.
      1.4 javadoc accepts code containing assertions, which were introduced in JDK 1.4.
      1.3 javadoc does not support assertions, generics, or other language features introduced after JDK 1.3.

      Use the value of release corresponding to that used when compiling the code with javac.

      Angegeben von:
      getSource in Schnittstelle MinimalJavadocOptions
    • setSource

      public void setSource(String source)
      Angegeben von:
      setSource in Schnittstelle MinimalJavadocOptions
    • source

      public MinimalJavadocOptions source(String source)
      Angegeben von:
      source in Schnittstelle MinimalJavadocOptions
    • getClasspath

      public List<File> getClasspath()
      -classpath classpathlist

      Specifies the paths where javadoc will look for referenced classes (.class files) -- these are the documented classes plus any classes referenced by those classes. The classpathlist can contain multiple paths by separating them with a semicolon (;). The Javadoc tool will search in all subdirectories of the specified paths. Follow the instructions in class path documentation for specifying classpathlist.

      If -sourcepath is omitted, the Javadoc tool uses -classpath to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both -sourcepath and -classpath.

      For example, if you want to document com.mypackage, whose source files reside in the directory C:/user/src/com/mypackage, and if this package relies on a library in C:/user/lib, you would specify:

      javadoc -classpath /user/lib -sourcepath /user/src com.mypackage

      As with other tools, if you do not specify -classpath, the Javadoc tool uses the CLASSPATH environment variable, if it is set. If both are not set, the Javadoc tool searches for classes from the current directory.

      For an in-depth description of how the Javadoc tool uses -classpath to find user classes as it relates to extension classes and bootstrap classes, see How Classes Are Found.

      Angegeben von:
      getClasspath in Schnittstelle MinimalJavadocOptions
    • setClasspath

      public void setClasspath(List<File> classpath)
      Angegeben von:
      setClasspath in Schnittstelle MinimalJavadocOptions
    • getModulePath

      public List<File> getModulePath()
      Beschreibung aus Schnittstelle kopiert: MinimalJavadocOptions
      The --module-path.
      Angegeben von:
      getModulePath in Schnittstelle MinimalJavadocOptions
    • setModulePath

      public void setModulePath(List<File> modulePath)
      Beschreibung aus Schnittstelle kopiert: MinimalJavadocOptions
      The --module-path.
      Angegeben von:
      setModulePath in Schnittstelle MinimalJavadocOptions
    • modulePath

      public MinimalJavadocOptions modulePath(List<File> modulePath)
      Beschreibung aus Schnittstelle kopiert: MinimalJavadocOptions
      The --module-path.
      Angegeben von:
      modulePath in Schnittstelle MinimalJavadocOptions
    • classpath

      public MinimalJavadocOptions classpath(List<File> classpath)
      Angegeben von:
      classpath in Schnittstelle MinimalJavadocOptions
    • classpath

      public MinimalJavadocOptions classpath(File... classpath)
      Angegeben von:
      classpath in Schnittstelle MinimalJavadocOptions
    • getBootClasspath

      public List<File> getBootClasspath()
      -bootclasspath classpathlist Specifies the paths where the boot classes reside. These are nominally the Java platform classes. The bootclasspath is part of the search path the Javadoc tool will use to look up source and class files. See How Classes Are Found. for more details. Separate directories in classpathlist with semicolons (;).
      Angegeben von:
      getBootClasspath in Schnittstelle MinimalJavadocOptions
    • setBootClasspath

      public void setBootClasspath(List<File> bootClasspath)
      Angegeben von:
      setBootClasspath in Schnittstelle MinimalJavadocOptions
    • bootClasspath

      public MinimalJavadocOptions bootClasspath(File... bootClasspath)
      Angegeben von:
      bootClasspath in Schnittstelle MinimalJavadocOptions
    • getExtDirs

      public List<File> getExtDirs()
      -extdirs dirlist

      Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path the Javadoc tool will use to look up source and class files. See -classpath (above) for more details. Separate directories in dirlist with semicolons (;).

      Angegeben von:
      getExtDirs in Schnittstelle MinimalJavadocOptions
    • setExtDirs

      public void setExtDirs(List<File> extDirs)
      Angegeben von:
      setExtDirs in Schnittstelle MinimalJavadocOptions
    • extDirs

      public MinimalJavadocOptions extDirs(File... extDirs)
      Angegeben von:
      extDirs in Schnittstelle MinimalJavadocOptions
    • getOutputLevel

      public JavadocOutputLevel getOutputLevel()
      Control the Javadoc output level (-verbose or -quiet).
      Angegeben von:
      getOutputLevel in Schnittstelle MinimalJavadocOptions
    • setOutputLevel

      public void setOutputLevel(JavadocOutputLevel outputLevel)
      Angegeben von:
      setOutputLevel in Schnittstelle MinimalJavadocOptions
    • verbose

      public MinimalJavadocOptions verbose()
      Angegeben von:
      verbose in Schnittstelle MinimalJavadocOptions
    • isVerbose

      public boolean isVerbose()
      Angegeben von:
      isVerbose in Schnittstelle MinimalJavadocOptions
    • quiet

      public MinimalJavadocOptions quiet()
      Angegeben von:
      quiet in Schnittstelle MinimalJavadocOptions
    • isBreakIterator

      public boolean isBreakIterator()
      -breakiterator

      Uses the internationalized sentence boundary of java.text.BreakIterator to determine the end of the first sentence for English (all other locales already use BreakIterator), rather than an English language, locale-specific algorithm. By first sentence, we mean the first sentence in the main description of a package, class or member. This sentence is copied to the package, class or member summary, and to the alphabetic index.

      From JDK 1.2 forward, the BreakIterator class is already used to determine the end of sentence for all languages but English. Therefore, the -breakiterator option has no effect except for English from 1.2 forward. English has its own default algorithm:

      * English default sentence-break algorithm - Stops at a period followed by a space or a HTML block tag, such as <P>.

      * Breakiterator sentence-break algorithm - In general, stops at a period, question mark or exclamation mark followed by a space if the next word starts with a capital letter. This is meant to handle most abbreviations (such as "The serial no. is valid", but won't handle "Mr. Smith"). Doesn't stop at HTML tags or sentences that begin with numbers or symbols. Stops at the last period in "../filename", even if embedded in an HTML tag.

      NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and have left the default sentence-break algorithm unchanged. That is, the -breakiterator option is not the default in 1.5.0, nor do we expect it to become the default. This is a reversal from our former intention that the default would change in the "next major release" (1.5.0). This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x, then you don't have to do anything, and the warnings go away starting with 1.5.0. The reason for this reversal is because any benefit to having breakiterator become the default would be outweighed by the incompatible source change it would require. We regret any extra work and confusion this has caused.

      Angegeben von:
      isBreakIterator in Schnittstelle MinimalJavadocOptions
    • setBreakIterator

      public void setBreakIterator(boolean breakIterator)
      Angegeben von:
      setBreakIterator in Schnittstelle MinimalJavadocOptions
    • breakIterator

      public MinimalJavadocOptions breakIterator(boolean breakIterator)
      Angegeben von:
      breakIterator in Schnittstelle MinimalJavadocOptions
    • breakIterator

      public MinimalJavadocOptions breakIterator()
      Angegeben von:
      breakIterator in Schnittstelle MinimalJavadocOptions
    • getLocale

      public String getLocale()
      -locale language_country_variant

      Important - The -locale option must be placed ahead (to the left) of any options provided by the standard doclet or any other doclet. Otherwise, the navigation bars will appear in English. This is the only command-line option that is order-dependent.

      Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as en_US (English, United States) or en_US_WIN (Windows variant).

      Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes.

      Angegeben von:
      getLocale in Schnittstelle MinimalJavadocOptions
    • setLocale

      public void setLocale(String locale)
      Angegeben von:
      setLocale in Schnittstelle MinimalJavadocOptions
    • locale

      public MinimalJavadocOptions locale(String locale)
      Angegeben von:
      locale in Schnittstelle MinimalJavadocOptions
    • getEncoding

      public String getEncoding()
      -encoding name

      Specifies the encoding name of the source files, such as EUCJIS/SJIS. If this option is not specified, the platform default converter is used.

      Also see -docencoding and -charset.

      Angegeben von:
      getEncoding in Schnittstelle MinimalJavadocOptions
    • setEncoding

      public void setEncoding(String encoding)
      Angegeben von:
      setEncoding in Schnittstelle MinimalJavadocOptions
    • encoding

      public MinimalJavadocOptions encoding(String encoding)
      Angegeben von:
      encoding in Schnittstelle MinimalJavadocOptions
    • getSourceNames

      public List<String> getSourceNames()
      Angegeben von:
      getSourceNames in Schnittstelle MinimalJavadocOptions
    • setSourceNames

      public void setSourceNames(List<String> sourceNames)
      Angegeben von:
      setSourceNames in Schnittstelle MinimalJavadocOptions
    • sourceNames

      public MinimalJavadocOptions sourceNames(String... sourceNames)
      Angegeben von:
      sourceNames in Schnittstelle MinimalJavadocOptions
    • getJFlags

      public List<String> getJFlags()
      -Jflag

      Passes flag directly to the runtime system java that runs javadoc. Notice there must be no space between the J and the flag. For example, if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation, then you would call the -Xmx option of java as follows (-Xms is optional, as it only sets the size of initial memory, which is useful if you know the minimum amount of memory required):

      javadoc -J-Xmx32m -J-Xms32m com.mypackage

      To tell what version of javadoc you are using, call the "-version" option of java:

      javadoc -J-version java version "1.2" Classic VM (build JDK-1.2-V, green threads, sunwjit)

      (The version number of the standard doclet appears in its output stream.)

      Angegeben von:
      getJFlags in Schnittstelle MinimalJavadocOptions
    • setJFlags

      public void setJFlags(List<String> jFlags)
      Angegeben von:
      setJFlags in Schnittstelle MinimalJavadocOptions
    • jFlags

      public MinimalJavadocOptions jFlags(String... jFlags)
      Angegeben von:
      jFlags in Schnittstelle MinimalJavadocOptions
    • contributeCommandLineOptions

      public void contributeCommandLineOptions(ExecSpec execHandleBuilder)
      Angegeben von:
      contributeCommandLineOptions in Schnittstelle MinimalJavadocOptions
    • getOptionFiles

      public List<File> getOptionFiles()
      Angegeben von:
      getOptionFiles in Schnittstelle MinimalJavadocOptions
    • setOptionFiles

      public void setOptionFiles(List<File> optionFiles)
      Angegeben von:
      setOptionFiles in Schnittstelle MinimalJavadocOptions
    • optionFiles

      public MinimalJavadocOptions optionFiles(File... argumentFiles)
      Angegeben von:
      optionFiles in Schnittstelle MinimalJavadocOptions
    • write

      public final void write(File outputFile) throws IOException
      Angegeben von:
      write in Schnittstelle MinimalJavadocOptions
      Löst aus:
      IOException
    • addOption

      public <T> JavadocOptionFileOption<T> addOption(JavadocOptionFileOption<T> option)
    • addStringOption

      public JavadocOptionFileOption<String> addStringOption(String option)
    • addStringOption

      public JavadocOptionFileOption<String> addStringOption(String option, String value)
    • addEnumOption

      public <T extends Enum<T>> JavadocOptionFileOption<T> addEnumOption(String option)
    • addEnumOption

      public <T extends Enum<T>> JavadocOptionFileOption<T> addEnumOption(String option, T value)
    • addPathOption

      public JavadocOptionFileOption<List<File>> addPathOption(String option)
    • addPathOption

      public JavadocOptionFileOption<List<File>> addPathOption(String option, String joinBy)
    • addStringsOption

      public JavadocOptionFileOption<List<String>> addStringsOption(String option)
    • addStringsOption

      public JavadocOptionFileOption<List<String>> addStringsOption(String option, String joinBy)
      Adds an option that will have multiple values joined by the provided separator.

      addStringsOption("foo", ",").setValue(["a", "b", "c"]) will produce the command-line

           -foo 'a,b,c'
       
      Parameter:
      option - command-line option
      joinBy - separator
    • addMultilineStringsOption

      public JavadocOptionFileOption<List<String>> addMultilineStringsOption(String option)
      Adds an option that will appear multiple times to the javadoc tool. Each line can have one value.

      addMultilineStringsOption("foo").setValue(["a", "b", "c"]) will produce the command-line

           -foo 'a'
           -foo 'b'
           -foo 'c'
       
      Parameter:
      option - command-line option
    • addMultilineMultiValueOption

      public JavadocOptionFileOption<List<List<String>>> addMultilineMultiValueOption(String option)
      Adds an option that will appear multiple times to the javadoc tool. Each line can have more than one value separated by spaces.

      addMultilineMultiValueOption("foo").setValue([ ["a"], ["b", "c"] ]) will produce the command-line

           -foo 'a'
           -foo 'b' 'c'
       
      Parameter:
      option - command-line option
      Seit:
      3.5
    • addBooleanOption

      public JavadocOptionFileOption<Boolean> addBooleanOption(String option)
    • addBooleanOption

      public JavadocOptionFileOption<Boolean> addBooleanOption(String option, boolean value)
    • addFileOption

      public JavadocOptionFileOption<File> addFileOption(String option)
    • addFileOption

      public JavadocOptionFileOption<File> addFileOption(String option, File value)
    • getExtraOptions

      @Incubating @Input protected String getExtraOptions()
      This method exists so that changing any options to the Javadoc task causes it to be re-run.
      Gibt zurück:
      the complete list of options, converted to strings
      Seit:
      7.5