提交 f4a4e944 编写于 作者: L lana

Merge

...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
# Makefile for langtools: wrapper around Ant build.xml file # Makefile for langtools: wrapper around Ant build.xml file
# #
# On Solaris, the 'make' utility from Sun will not work with these makefiles. # On Solaris, the standard 'make' utility will not work with these makefiles.
# This little rule is only understood by Sun's make, and is harmless # This little rule is only understood by Solaris make, and is harmless
# when seen by the GNU make tool. If using Sun's make, this causes the # when seen by the GNU make tool. If using Solaris make, this causes the
# make command to fail. # make command to fail.
# #
SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33 SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
...@@ -40,15 +40,16 @@ SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33 ...@@ -40,15 +40,16 @@ SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
SYSTEM_UNAME := $(shell uname) SYSTEM_UNAME := $(shell uname)
# Where is unwanted output to be delivered?
# On Windows, MKS uses the special file "NUL", cygwin uses the customary unix file.
ifeq ($(SYSTEM_UNAME), Windows_NT) ifeq ($(SYSTEM_UNAME), Windows_NT)
DEV_NULL = NUL DEV_NULL = NUL
else else
DEV_NULL = /dev/null
endif
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
DEV_NULL = NUL
USING_CYGWIN = true USING_CYGWIN = true
else
DEV_NULL = /dev/null
endif
endif endif
ifdef USING_CYGWIN ifdef USING_CYGWIN
...@@ -202,7 +203,7 @@ $(ANT_TARGETS): $(OUTPUTDIR)/build/ant-diagnostics.log ...@@ -202,7 +203,7 @@ $(ANT_TARGETS): $(OUTPUTDIR)/build/ant-diagnostics.log
#------------------------------------------------------------------- #-------------------------------------------------------------------
# #
# Targets for Sun's internal JPRT build system # Targets for Oracle's internal JPRT build system
CD = cd CD = cd
ZIP = zip ZIP = zip
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
# #
# #
# On Solaris, the 'make' utility from Sun will not work with these makefiles. # On Solaris, the standard 'make' utility will not work with these makefiles.
# This little rule is only understood by Sun's make, and is harmless # This little rule is only understood by Solaris make, and is harmless
# when seen by the GNU make tool. If using Sun's make, this causes the # when seen by the GNU make tool. If using Solaris make, this causes the
# make command to fail. # make command to fail.
# #
SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33 SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
......
...@@ -76,17 +76,27 @@ javadoc.jls3.cite=<a href="${javadoc.jls3.url}">The Java Languag ...@@ -76,17 +76,27 @@ javadoc.jls3.cite=<a href="${javadoc.jls3.url}">The Java Languag
javadoc.jls3.option=-tag "jls3:a:See <cite>${javadoc.jls3.cite}</cite>:" javadoc.jls3.option=-tag "jls3:a:See <cite>${javadoc.jls3.cite}</cite>:"
# jtreg, used to run the JDK regression tests # jtreg, used to run the JDK regression tests
# See http://openjdk.java.net/jtreg/
# Override this path as needed, either on the command line or in # Override this path as needed, either on the command line or in
# one of the standard user build.properties files (see build.xml) # one of the standard user build.properties files (see build.xml)
# jtreg.home = /opt/jtreg/3.2.2_02 # jtreg.home = /opt/jtreg/4.1
# findbugs # findbugs
# See http://findbugs.sourceforge.net/
# Override this path as needed, either on the command line or in # Override this path as needed, either on the command line or in
# one of the standard user build.properties files (see build.xml) # one of the standard user build.properties files (see build.xml)
# findbugs.home = /opt/findbugs/1.2.1 # findbugs.home = /opt/findbugs/1.2.1
# vizant (graph visualization tool for Ant)
# See http://vizant.sourceforge.net/
# Override this path as needed, either on the command line or in
# one of the standard user build.properties files (see build.xml)
# vizant.jar = /opt/vizant/0.1.2/vizant-0.1.2.jar
# dot = dot
#------------------------------------------------------------ #------------------------------------------------------------
# The following properties define the packages for each of the tools. # The following properties define the packages for each of the tools.
...@@ -148,12 +158,14 @@ apt.tests = \ ...@@ -148,12 +158,14 @@ apt.tests = \
# #
# The following files require the import JDK to be available # The following files require the latest JDK to be available.
require.import.jdk.files = \ # The API can be provided by using a suitable boot.java.home
# or by setting import.jdk
require.latest.jdk.files = \
com/sun/tools/javac/nio/*.java com/sun/tools/javac/nio/*.java
# The following files in the import jdk source directory are required # The following files in the import jdk source directory are required
# in order to compile the files defined in ${require.import.jdk.files} # in order to compile the files defined in ${require.latest.jdk.files}
# #
# For NIO, the list of stub files is defined by the contents of the primary # For NIO, the list of stub files is defined by the contents of the primary
# API packages, together with such types that may be required in order to # API packages, together with such types that may be required in order to
......
...@@ -25,12 +25,79 @@ ...@@ -25,12 +25,79 @@
--> -->
<!-- <!--
This is the main build file for the complete langtools workspace. This is the main build file for the complete langtools repository.
It is used both when working on the tools in NetBeans, and when building It is used when building JDK (in which case it is invoked from the
JDK itself, in which case it is invoked from the wrapper Makefile. Makefile), and it can be used when working on the tools themselves,
in an IDE such as NetBeans.
External dependencies are specified via properties. These can be given
on the command line, or by providing a local build.properties file.
(They can also be edited into make/build.properties, although that is not
recommended.) At a minimum, boot.java.home must be set to the installed
location of the version of JDK used to build this repository. Additional
properties may be required, depending on the targets that are built.
For example, to run any of the jtreg tests you must set jtreg.home,
to run findbugs on the code you must set findbugs.home, and so on.
For the most part, javac can be built using the previous version of JDK.
However, a small number of javac files require access to the latest JDK,
which may not yet have been compiled. To compile these files, you can do
one of the following:
- Set boot.java.home to a recent build of the latest version of JDK.
- Set import.jdk to either a recent build (containing jre/lib/rt.jar)
or to jdk source repository. In the latter case, stub files will
automatically be generated and used for the required API, to avoid
unnecessary compilation of the source repository.
If you do neither, the relevant files will not be built.
The main build happens in two phases:
- First, javac and other tools as needed are built using ${boot.java.home}.
(This implies a constraint on the source code that they can be compiled
with the previous version of JDK.
- Second, all required classes are compiled with the latest javac, created
in the previous step.
The first phase is called the bootstrap phase. All targets, properties and
tasks that are specific to that phase have "bootstrap" in their name.
For more details on the JDK build, see
http://blogs.sun.com/kto/entry/anatomy_of_the_jdk_build
http://openjdk.java.net/groups/build/
For more details on the stub generator, see
http://blogs.sun.com/jjg/entry/building_javac_for_jdk7
Internal details ...
Interim build products are created in the build/ directory.
Final build products are created in the dist/ directory.
When building JDK, the dist/directory will contain:
- A bootstrap compiler suitable for running with ${boot.java.home}
suitable for compiling downstream parts of JDK
- Source files and class files for inclusion in the JDK being built
When building standalone, the dist/directory will contain:
- Separate jar files for each of the separate langtools components
- Simple scripts to invoke the tools by executing the corresponding
jar files.
These jar files and scripts are "for developer use only".
This file is organized into sections as follows:
- global property definitions
- general top level targets
- general diagnostic/debugging targets
- groups of targets for each tool: javac, javadoc, doclets, javah, javap, apt
Within each group, the following targets are provided, where applicable
build-bootstrap-TOOL build the bootstrap version of the tool
build-classes-TOOL build the classes for the tool
build-TOOL build the jar file and script for the tool
jtreg-TOOL build the tool and run the appropriate tests
findbugs-TOOL run findbugs on the tool's source oode
TOOL build the tool, run the tests, and run findbugs
- utility definitions
--> -->
<project name="langtools" default="build" basedir=".."> <project name="langtools" default="build" basedir="..">
<!--
**** Global property definitions.
-->
<!-- Force full debuginfo for javac if the debug.classfiles <!-- Force full debuginfo for javac if the debug.classfiles
property is set. This must be BEFORE the include of property is set. This must be BEFORE the include of
...@@ -107,35 +174,55 @@ ...@@ -107,35 +174,55 @@
ignoresystemclasses="true" ignoresystemclasses="true"
classpath="${import.jdk}/jre/lib/rt.jar" classname="java.nio.file.Path"/> classpath="${import.jdk}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
<!-- Set the default value of the sourcepath used for javac. --> <!-- Set the default bootclasspath option used for javac.
<condition property="javac.sourcepath" value="${build.genstubs.dir}" else=""> Note that different variants of the option are used, meaning we can't just
<isset property="import.jdk.src.dir"/> define the value for the option.
</condition> Note the explicit use of the standard property ${path.separator} in the following.
This is because Ant is not clever enough to handle direct use of : or ; -->
<!-- Set the default value of the classpath used for javac. -->
<property name="javac.classpath" value=""/>
<!-- Set the default bootclasspath option used for javac.
Note that different variants of the option are used, meaning we can't just
define the value for the option.
Note the explicit use of the standard property ${path.separator} in the following.
This is because Ant is not clever enough to handle direct use of : or ; -->
<condition property="javac.bootclasspath.opt" <condition property="javac.bootclasspath.opt"
value="-Xbootclasspath:${build.classes.dir}${path.separator}${import.jdk.jar}" value="-Xbootclasspath:${build.classes.dir}${path.separator}${import.jdk.jar}"
else="-Xbootclasspath/p:${build.classes.dir}"> else="-Xbootclasspath/p:${build.classes.dir}">
<isset property="import.jdk.jar"/> <isset property="import.jdk.jar"/>
</condition> </condition>
<condition property="exclude.files" value="" else="${require.import.jdk.files}"> <condition property="boot.java.provides.latest.jdk">
<isset property="import.jdk"/> <available
ignoresystemclasses="true"
classpath="${boot.java.home}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
</condition> </condition>
<!-- for debugging --> <condition property="bootstrap.exclude.files" value="" else="${require.latest.jdk.files}">
<target name="check-import.jdk"> <isset property="boot.java.provides.latest.jdk"/>
<echo message="import.jdk: ${import.jdk}"/> </condition>
<echo message="import.jdk.jar: ${import.jdk.jar}"/>
<echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/> <condition property="exclude.files" value="" else="${require.latest.jdk.files}">
</target> <or>
<isset property="boot.java.provides.latest.jdk"/>
<isset property="import.jdk"/>
</or>
</condition>
<condition property="require.import.jdk.stubs">
<and>
<not>
<isset property="boot.java.provides.latest.jdk"/>
</not>
<isset property="import.jdk.src.dir"/>
</and>
</condition>
<!-- Set the default value of the sourcepath used for javac. -->
<condition property="javac.sourcepath" value="${build.genstubs.dir}" else="">
<isset property="require.import.jdk.stubs"/>
</condition>
<!-- Set the default value of the classpath used for javac. -->
<property name="javac.classpath" value=""/>
<!--
**** General top level targets.
-->
<!-- Standard target to build deliverables for JDK build. --> <!-- Standard target to build deliverables for JDK build. -->
...@@ -235,7 +322,61 @@ ...@@ -235,7 +322,61 @@
datafile="${build.coverage.dir}/cobertura.ser"/> datafile="${build.coverage.dir}/cobertura.ser"/>
</target> </target>
<!-- javac targets -->
<!--
**** Debugging/diagnostic targets.
-->
<!-- standard JDK target -->
<target name="sanity"
description="display settings of configuration values">
<echo level="info">ant.home = ${ant.home}</echo>
<echo level="info">boot.java.home = ${boot.java.home}</echo>
<echo level="info">target.java.home = ${target.java.home}</echo>
<echo level="info">jtreg.home = ${jtreg.home}</echo>
<echo level="info">findbugs.home = ${findbugs.home}</echo>
</target>
<target name="post-sanity" depends="-def-jtreg,sanity,build"
description="perform basic validation after a standard build">
<jtreg
dir="make/test"
workDir="${build.jtreg.dir}/post-sanity/work"
reportDir="${build.jtreg.dir}/post-sanity/report"
jdk="${target.java.home}"
verbose="summary"
failonerror="false" resultproperty="jtreg.post-sanity.result">
</jtreg>
</target>
<!-- use vizant tool to generate graphical image of this Ant file.-->
<target name="vizant" depends="-def-vizant">
<mkdir dir="${build.dir}"/>
<echo message="Generating ${build.dir}/build.dot"/>
<vizant antfile="${make.dir}/build.xml" outfile="${build.dir}/build.dot"/>
<echo message="Generating ${build.dir}/build.png"/>
<exec executable="${dot}" >
<arg value="-Tpng"/>
<arg value="-o"/>
<arg file="${build.dir}/build.png"/>
<arg file="${build.dir}/build.dot"/>
</exec>
</target>
<target name="check-import.jdk">
<echo message="import.jdk: ${import.jdk}"/>
<echo message="import.jdk.jar: ${import.jdk.jar}"/>
<echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/>
</target>
<target name="diagnostics">
<diagnostics/>
</target>
<!--
**** javac targets.
-->
<target name="build-bootstrap-javac" <target name="build-bootstrap-javac"
depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool"> depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
...@@ -267,7 +408,10 @@ ...@@ -267,7 +408,10 @@
<target name="javac" depends="build-javac,jtreg-javac,findbugs-javac"/> <target name="javac" depends="build-javac,jtreg-javac,findbugs-javac"/>
<!-- javadoc targets -->
<!--
**** javadoc targets.
-->
<target name="build-bootstrap-javadoc" depends="build-bootstrap-javac"> <target name="build-bootstrap-javadoc" depends="build-bootstrap-javac">
<build-bootstrap-classes includes="${javadoc.includes}"/> <build-bootstrap-classes includes="${javadoc.includes}"/>
...@@ -300,7 +444,10 @@ ...@@ -300,7 +444,10 @@
<target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/> <target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/>
<!-- doclets targets -->
<!--
**** doclets targets.
-->
<target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar"> <target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar">
<build-bootstrap-classes includes="${doclets.includes}"/> <build-bootstrap-classes includes="${doclets.includes}"/>
...@@ -330,7 +477,10 @@ ...@@ -330,7 +477,10 @@
<target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/> <target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/>
<!-- javah targets -->
<!--
**** javah targets.
-->
<target name="build-bootstrap-javah" depends="build-bootstrap-javadoc"> <target name="build-bootstrap-javah" depends="build-bootstrap-javadoc">
<build-bootstrap-classes includes="${javah.includes}"/> <build-bootstrap-classes includes="${javah.includes}"/>
...@@ -360,7 +510,10 @@ ...@@ -360,7 +510,10 @@
<target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/> <target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/>
<!-- javap targets -->
<!--
**** javap targets.
-->
<target name="build-bootstrap-javap" <target name="build-bootstrap-javap"
depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool"> depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
...@@ -393,7 +546,10 @@ ...@@ -393,7 +546,10 @@
<target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/> <target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/>
<!-- apt targets -->
<!--
**** apt targets.
-->
<target name="build-bootstrap-apt" depends="build-bootstrap-javac"> <target name="build-bootstrap-apt" depends="build-bootstrap-javac">
<build-bootstrap-classes includes="${apt.includes}"/> <build-bootstrap-classes includes="${apt.includes}"/>
...@@ -426,9 +582,12 @@ ...@@ -426,9 +582,12 @@
<target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/> <target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/>
<!-- Create import JDK stubs -->
<target name="-create-import-jdk-stubs" depends="-def-genstubs" if="import.jdk.src.dir"> <!--
**** Create import JDK stubs.
-->
<target name="-create-import-jdk-stubs" depends="-def-genstubs" if="require.import.jdk.stubs">
<mkdir dir="${build.genstubs.dir}"/> <mkdir dir="${build.genstubs.dir}"/>
<genstubs <genstubs
srcdir="${import.jdk.src.dir}" destdir="${build.genstubs.dir}" srcdir="${import.jdk.src.dir}" destdir="${build.genstubs.dir}"
...@@ -437,7 +596,12 @@ ...@@ -437,7 +596,12 @@
/> />
</target> </target>
<!-- Check targets -->
<!--
**** Check targets.
**** "-check-*" targets check that a required property is set, and set to a reasonable value.
**** A user friendly message is generated if not, and the build exits.
-->
<target name="-check-boot.java.home" depends="-def-check"> <target name="-check-boot.java.home" depends="-def-check">
<check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/> <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
...@@ -459,7 +623,15 @@ ...@@ -459,7 +623,15 @@
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/> <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
</target> </target>
<!-- Ant macro and preset defs --> <target name="-check-vizant" depends="-def-check">
<check name="vizant" property="vizant.jar"/>
<check name="dot" property="dot"/>
</target>
<!--
**** Targets for Ant macro and task definitions.
-->
<target name="-def-build-tool"> <target name="-def-build-tool">
<macrodef name="build-tool"> <macrodef name="build-tool">
...@@ -599,7 +771,7 @@ ...@@ -599,7 +771,7 @@
sourcepath="" sourcepath=""
release="${bootstrap.release}" release="${bootstrap.release}"
full.version="${bootstrap.full.version}" full.version="${bootstrap.full.version}"
excludes="${require.import.jdk.files} **/package-info.java"/> excludes="${bootstrap.exclude.files} **/package-info.java"/>
</presetdef> </presetdef>
</target> </target>
...@@ -617,7 +789,7 @@ ...@@ -617,7 +789,7 @@
classpath="${build.toolclasses.dir}/"/> classpath="${build.toolclasses.dir}/"/>
</target> </target>
<target name="-def-genstubs" depends="build-bootstrap-javac"> <target name="-def-genstubs" depends="build-bootstrap-javac" if="require.import.jdk.stubs">
<mkdir dir="${build.toolclasses.dir}"/> <mkdir dir="${build.toolclasses.dir}"/>
<javac fork="true" <javac fork="true"
source="${boot.javac.source}" source="${boot.javac.source}"
...@@ -640,7 +812,7 @@ ...@@ -640,7 +812,7 @@
<sequential> <sequential>
<property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project --> <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
<!-- Note: even with this default value, includes <!-- Note: even with this default value, includes
from src.classes.dir get javadoc'd; see packageset below --> from src.classes.dir get javadoc'd; see packageset below -->
<property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project --> <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
<javadoc <javadoc
executable="${target.java.home}/bin/javadoc" executable="${target.java.home}/bin/javadoc"
...@@ -691,13 +863,15 @@ ...@@ -691,13 +863,15 @@
<attribute name="tests"/> <attribute name="tests"/>
<attribute name="jdk" default="${target.java.home}"/> <attribute name="jdk" default="${target.java.home}"/>
<attribute name="samevm" default="true"/> <attribute name="samevm" default="true"/>
<attribute name="verbose" default="summary"/> <attribute name="verbose" default="${default.jtreg.verbose}"/>
<attribute name="options" default=""/> <attribute name="options" default="${other.jtreg.options}"/>
<attribute name="keywords" default="-keywords:!ignore"/> <attribute name="keywords" default="-keywords:!ignore"/>
<attribute name="jpda.jvmargs" default=""/> <attribute name="jpda.jvmargs" default=""/>
<sequential> <sequential>
<property name="coverage.options" value=""/> <!-- default --> <property name="coverage.options" value=""/> <!-- default -->
<property name="coverage.classpath" value=""/> <!-- default --> <property name="coverage.classpath" value=""/> <!-- default -->
<property name="default.jtreg.verbose" value="summary"/> <!-- default -->
<property name="other.jtreg.options" value=""/> <!-- default -->
<jtreg <jtreg
dir="${test.dir}" dir="${test.dir}"
workDir="${build.jtreg.dir}/@{name}/work" workDir="${build.jtreg.dir}/@{name}/work"
...@@ -766,11 +940,16 @@ ...@@ -766,11 +940,16 @@
<property name="findbugs.defined" value="true"/> <property name="findbugs.defined" value="true"/>
</target> </target>
<target name="-def-vizant" unless="vizant.defined" depends="-check-vizant">
<taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="${vizant.jar}"/>
<property name="vizant.defined" value="true"/>
</target>
<target name="-def-check"> <target name="-def-check">
<macrodef name="check"> <macrodef name="check">
<attribute name="name"/> <attribute name="name"/>
<attribute name="property"/> <attribute name="property"/>
<attribute name="marker"/> <attribute name="marker" default=""/>
<sequential> <sequential>
<fail message="Cannot locate @{name}: please set @{property} to its location"> <fail message="Cannot locate @{name}: please set @{property} to its location">
<condition> <condition>
...@@ -781,41 +960,19 @@ ...@@ -781,41 +960,19 @@
</fail> </fail>
<fail message="@{name} is not installed in ${@{property}}"> <fail message="@{name} is not installed in ${@{property}}">
<condition> <condition>
<not> <and>
<available file="${@{property}}/@{marker}"/> <not>
</not> <equals arg1="@{marker}" arg2=""/>
</not>
<not>
<available file="${@{property}}/@{marker}"/>
</not>
</and>
</condition> </condition>
</fail> </fail>
</sequential> </sequential>
</macrodef> </macrodef>
</target> </target>
<!-- standard JDK target -->
<target name="sanity"
description="display settings of configuration values">
<echo level="info">ant.home = ${ant.home}</echo>
<echo level="info">boot.java.home = ${boot.java.home}</echo>
<echo level="info">target.java.home = ${target.java.home}</echo>
<echo level="info">jtreg.home = ${jtreg.home}</echo>
<echo level="info">findbugs.home = ${findbugs.home}</echo>
</target>
<!-- useful debugging targets -->
<target name="diagnostics">
<diagnostics/>
</target>
<target name="post-sanity" depends="-def-jtreg,sanity,build"
description="perform basic validation after a standard build">
<jtreg
dir="make/test"
workDir="${build.jtreg.dir}/post-sanity/work"
reportDir="${build.jtreg.dir}/post-sanity/report"
jdk="${target.java.home}"
verbose="summary"
failonerror="false" resultproperty="jtreg.post-sanity.result">
</jtreg>
</target>
</project> </project>
...@@ -30,7 +30,7 @@ package com.sun.source.tree; ...@@ -30,7 +30,7 @@ package com.sun.source.tree;
* *
* <p><b>WARNING:</b> This interface and its sub-interfaces are * <p><b>WARNING:</b> This interface and its sub-interfaces are
* subject to change as the Java&trade; programming language evolves. * subject to change as the Java&trade; programming language evolves.
* These interfaces are implemented by Sun's Java compiler (javac) * These interfaces are implemented by the JDK Java compiler (javac)
* and should not be implemented either directly or indirectly by * and should not be implemented either directly or indirectly by
* other applications. * other applications.
* *
......
...@@ -36,7 +36,7 @@ import javax.tools.JavaCompiler.CompilationTask; ...@@ -36,7 +36,7 @@ import javax.tools.JavaCompiler.CompilationTask;
import javax.tools.JavaFileObject; import javax.tools.JavaFileObject;
/** /**
* Provides access to functionality specific to the Sun Java Compiler, javac. * Provides access to functionality specific to the JDK Java Compiler, javac.
* *
* @author Peter von der Ah&eacute; * @author Peter von der Ah&eacute;
* @author Jonathan Gibbons * @author Jonathan Gibbons
......
...@@ -30,7 +30,7 @@ import javax.lang.model.element.TypeElement; ...@@ -30,7 +30,7 @@ import javax.lang.model.element.TypeElement;
import javax.tools.JavaFileObject; import javax.tools.JavaFileObject;
/** /**
* Provides details about work that has been done by the Sun Java Compiler, javac. * Provides details about work that has been done by the JDK Java Compiler, javac.
* *
* @author Jonathan Gibbons * @author Jonathan Gibbons
* @since 1.6 * @since 1.6
......
...@@ -27,7 +27,7 @@ package com.sun.source.util; ...@@ -27,7 +27,7 @@ package com.sun.source.util;
/** /**
* Provides a listener to monitor the activity of the Sun Java Compiler, javac. * Provides a listener to monitor the activity of the JDK Java Compiler, javac.
* *
* @author Jonathan Gibbons * @author Jonathan Gibbons
* @since 1.6 * @since 1.6
......
...@@ -60,7 +60,7 @@ import static com.sun.tools.apt.mirror.declaration.DeclarationMaker.isJavaIdenti ...@@ -60,7 +60,7 @@ import static com.sun.tools.apt.mirror.declaration.DeclarationMaker.isJavaIdenti
/** /**
* Apt compiler phase. * Apt compiler phase.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b> * or deletion without notice.</b>
......
...@@ -35,8 +35,8 @@ import com.sun.tools.javac.util.ListBuffer; ...@@ -35,8 +35,8 @@ import com.sun.tools.javac.util.ListBuffer;
/** /**
* Various utility methods for processing Java tool command line arguments. * Various utility methods for processing Java tool command line arguments.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -45,7 +45,7 @@ import com.sun.mirror.apt.AnnotationProcessorFactory; ...@@ -45,7 +45,7 @@ import com.sun.mirror.apt.AnnotationProcessorFactory;
import com.sun.tools.javac.parser.DocCommentScanner; import com.sun.tools.javac.parser.DocCommentScanner;
/** /**
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b> * or deletion without notice.</b>
......
...@@ -61,7 +61,7 @@ import static com.sun.tools.javac.file.Paths.pathToURLs; ...@@ -61,7 +61,7 @@ import static com.sun.tools.javac.file.Paths.pathToURLs;
/** This class provides a commandline interface to the apt build-time /** This class provides a commandline interface to the apt build-time
* tool. * tool.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b> * or deletion without notice.</b>
......
...@@ -34,8 +34,8 @@ import com.sun.tools.javac.util.Position; ...@@ -34,8 +34,8 @@ import com.sun.tools.javac.util.Position;
/** A subtype of Log for use in APT. /** A subtype of Log for use in APT.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -32,8 +32,8 @@ import java.util.Set; ...@@ -32,8 +32,8 @@ import java.util.Set;
/** /**
* See JVMS3, sections 4.2, 4.6, 4.7. * See JVMS3, sections 4.2, 4.6, 4.7.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.16. * See JVMS3, section 4.8.16.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.15. * See JVMS3, section 4.8.15.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -31,8 +31,8 @@ import java.util.HashMap; ...@@ -31,8 +31,8 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
package com.sun.tools.classfile; package com.sun.tools.classfile;
/* /*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -32,8 +32,8 @@ import java.util.Iterator; ...@@ -32,8 +32,8 @@ import java.util.Iterator;
import java.util.Map; import java.util.Map;
/* /*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -28,8 +28,8 @@ package com.sun.tools.classfile; ...@@ -28,8 +28,8 @@ package com.sun.tools.classfile;
import java.io.IOException; import java.io.IOException;
/** /**
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -35,8 +35,8 @@ import static com.sun.tools.classfile.AccessFlags.*; ...@@ -35,8 +35,8 @@ import static com.sun.tools.classfile.AccessFlags.*;
/** /**
* See JVMS3, section 4.2. * See JVMS3, section 4.2.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -32,8 +32,8 @@ import java.io.IOException; ...@@ -32,8 +32,8 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
/** /**
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -42,8 +42,8 @@ import java.util.Map; ...@@ -42,8 +42,8 @@ import java.util.Map;
/** /**
* Rewrites a class file using a map of translations. * Rewrites a class file using a map of translations.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -41,8 +41,8 @@ import static com.sun.tools.classfile.StackMapTable_attribute.verification_type_ ...@@ -41,8 +41,8 @@ import static com.sun.tools.classfile.StackMapTable_attribute.verification_type_
/** /**
* Write a ClassFile data structure to a file or stream. * Write a ClassFile data structure to a file or stream.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -32,8 +32,8 @@ import java.util.NoSuchElementException; ...@@ -32,8 +32,8 @@ import java.util.NoSuchElementException;
/** /**
* See JVMS3, section 4.8.3. * See JVMS3, section 4.8.3.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -27,8 +27,8 @@ package com.sun.tools.classfile; ...@@ -27,8 +27,8 @@ package com.sun.tools.classfile;
import java.io.IOException; import java.io.IOException;
/** /**
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -33,8 +33,8 @@ import java.util.Iterator; ...@@ -33,8 +33,8 @@ import java.util.Iterator;
/** /**
* See JVMS3, section 4.5. * See JVMS3, section 4.5.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
package com.sun.tools.classfile; package com.sun.tools.classfile;
/* /*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.2. * See JVMS3, section 4.8.2.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
package com.sun.tools.classfile; package com.sun.tools.classfile;
/* /*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.15. * See JVMS3, section 4.8.15.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -31,8 +31,8 @@ import java.io.IOException; ...@@ -31,8 +31,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.4. * See JVMS3, section 4.4.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
package com.sun.tools.classfile; package com.sun.tools.classfile;
/* /*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -31,8 +31,8 @@ import java.io.IOException; ...@@ -31,8 +31,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.7. * See JVMS3, section 4.8.7.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.5. * See JVMS3, section 4.8.5.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -36,8 +36,8 @@ import static com.sun.tools.classfile.ExtendedAnnotation.TargetAttribute.*; ...@@ -36,8 +36,8 @@ import static com.sun.tools.classfile.ExtendedAnnotation.TargetAttribute.*;
/** /**
* See JSR 308 specification, section 4.1 * See JSR 308 specification, section 4.1
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -28,8 +28,8 @@ package com.sun.tools.classfile; ...@@ -28,8 +28,8 @@ package com.sun.tools.classfile;
import java.io.IOException; import java.io.IOException;
/* /*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -32,8 +32,8 @@ import com.sun.tools.classfile.ConstantPool.*; ...@@ -32,8 +32,8 @@ import com.sun.tools.classfile.ConstantPool.*;
/** /**
* See JVMS3, section 4.8.6. * See JVMS3, section 4.8.6.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -28,8 +28,8 @@ package com.sun.tools.classfile; ...@@ -28,8 +28,8 @@ package com.sun.tools.classfile;
/** /**
* See JVMS3, chapter 6. * See JVMS3, chapter 6.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
* *
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.12. * See JVMS3, section 4.8.12.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.13. * See JVMS3, section 4.8.13.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.14. * See JVMS3, section 4.8.14.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -28,8 +28,8 @@ package com.sun.tools.classfile; ...@@ -28,8 +28,8 @@ package com.sun.tools.classfile;
import java.io.IOException; import java.io.IOException;
/* /*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -34,8 +34,8 @@ import static com.sun.tools.classfile.Opcode.Set.*; ...@@ -34,8 +34,8 @@ import static com.sun.tools.classfile.Opcode.Set.*;
* <p>In addition to providing all the standard opcodes defined in JVMS, * <p>In addition to providing all the standard opcodes defined in JVMS,
* this class also provides legacy support for the PicoJava extensions. * this class also provides legacy support for the PicoJava extensions.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.16 and 4.8.17. * See JVMS3, section 4.8.16 and 4.8.17.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.17. * See JVMS3, section 4.8.17.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.18. * See JVMS3, section 4.8.18.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JSR 308 specification, section 4.1 * See JSR 308 specification, section 4.1
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.18 and 4.8.19. * See JVMS3, section 4.8.18 and 4.8.19.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JSR 308 specification, section 4 * See JSR 308 specification, section 4
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.16. * See JVMS3, section 4.8.16.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.18. * See JVMS3, section 4.8.18.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JSR 308 specification, section 4.1 * See JSR 308 specification, section 4.1
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -32,8 +32,8 @@ import com.sun.tools.classfile.Type.*; ...@@ -32,8 +32,8 @@ import com.sun.tools.classfile.Type.*;
/** /**
* See JVMS3 4.4.4. * See JVMS3 4.4.4.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.9. * See JVMS3, section 4.8.9.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -32,8 +32,8 @@ import java.io.IOException; ...@@ -32,8 +32,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.15. * See JVMS3, section 4.8.15.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.10. * See JVMS3, section 4.8.10.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -27,8 +27,8 @@ package com.sun.tools.classfile; ...@@ -27,8 +27,8 @@ package com.sun.tools.classfile;
import java.io.IOException; import java.io.IOException;
/** /**
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.4. * See JVMS3, section 4.8.4.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -28,8 +28,8 @@ package com.sun.tools.classfile; ...@@ -28,8 +28,8 @@ package com.sun.tools.classfile;
import java.io.IOException; import java.io.IOException;
/** /**
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -30,8 +30,8 @@ import java.io.IOException; ...@@ -30,8 +30,8 @@ import java.io.IOException;
/** /**
* See JVMS3, section 4.8.8. * See JVMS3, section 4.8.8.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -34,8 +34,8 @@ import java.util.Set; ...@@ -34,8 +34,8 @@ import java.util.Set;
* Family of classes used to represent the parsed form of a {@link Descriptor} * Family of classes used to represent the parsed form of a {@link Descriptor}
* or {@link Signature}. * or {@link Signature}.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
<title>com.sun.tools.doclets.formats.html package</title> <title>com.sun.tools.doclets.formats.html package</title>
</head> </head>
<body bgcolor="white"> <body bgcolor="white">
This is the default doclet provided by doclet provided by This is the default doclet provided with JDK that produces Javadoc's
Sun<font size="-2"><sup>TM</sup></font> that produces Javadoc's
default HTML-formatted API output. For more documentation default HTML-formatted API output. For more documentation
on this doclet, please refer to the link below. on this doclet, please refer to the link below.
......
...@@ -92,43 +92,41 @@ public abstract class AbstractBuilder { ...@@ -92,43 +92,41 @@ public abstract class AbstractBuilder {
public abstract void build() throws IOException; public abstract void build() throws IOException;
/** /**
* Build the documentation, as specified by the given XML elements. * Build the documentation, as specified by the given XML element.
* *
* @param elements the XML elements that specify which components to * @param node the XML element that specifies which component to document.
* document.
*/ */
protected void build(List<?> elements) { protected void build(XMLNode node) {
for (int i = 0; i < elements.size(); i++ ) { String component = node.name;
Object element = elements.get(i); try {
String component = (String) invokeMethod("build" + component,
((element instanceof String) ? new Class<?>[] { XMLNode.class },
element : new Object[] { node });
((List<?>) element).get(0)); } catch (NoSuchMethodException e) {
try { e.printStackTrace();
invokeMethod("build" + component, configuration.root.printError("Unknown element: " + component);
element instanceof String ? throw new DocletAbortException();
new Class<?>[] {} : } catch (InvocationTargetException e) {
new Class<?>[] {List.class}, e.getCause().printStackTrace();
element instanceof String ? } catch (Exception e) {
new Object[] {} : e.printStackTrace();
new Object[] {((List<?>) element).subList(1, configuration.root.printError("Exception " +
((List<?>) element).size())}); e.getClass().getName() +
} catch (NoSuchMethodException e) { " thrown while processing element: " + component);
e.printStackTrace(); throw new DocletAbortException();
configuration.root.printError("Unknown element: " + component);
throw new DocletAbortException();
} catch (InvocationTargetException e) {
e.getCause().printStackTrace();
} catch (Exception e) {
e.printStackTrace();
configuration.root.printError("Exception " +
e.getClass().getName() +
" thrown while processing element: " + component);
throw new DocletAbortException();
}
} }
} }
/**
* Build the documentation, as specified by the children of the given XML element.
*
* @param node the XML element that specifies which components to document.
*/
protected void buildChildren(XMLNode node) {
for (XMLNode child: node.children)
build(child);
}
/** /**
* Given the name and parameters, invoke the method in the builder. This * Given the name and parameters, invoke the method in the builder. This
* method is required to invoke the appropriate build method as instructed * method is required to invoke the appropriate build method as instructed
...@@ -138,7 +136,14 @@ public abstract class AbstractBuilder { ...@@ -138,7 +136,14 @@ public abstract class AbstractBuilder {
* @param paramClasses the types for each parameter. * @param paramClasses the types for each parameter.
* @param params the parameters of the method. * @param params the parameters of the method.
*/ */
protected abstract void invokeMethod(String methodName, Class<?>[] paramClasses, protected void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params) Object[] params)
throws Exception; throws Exception {
if (DEBUG) {
configuration.root.printError("DEBUG: " + this.getClass().getName()
+ "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
} }
...@@ -27,7 +27,6 @@ package com.sun.tools.doclets.internal.toolkit.builders; ...@@ -27,7 +27,6 @@ package com.sun.tools.doclets.internal.toolkit.builders;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import java.util.*;
/** /**
* The superclass for all member builders. Member builders are only executed * The superclass for all member builders. Member builders are only executed
...@@ -69,9 +68,10 @@ public abstract class AbstractMemberBuilder extends AbstractBuilder { ...@@ -69,9 +68,10 @@ public abstract class AbstractMemberBuilder extends AbstractBuilder {
* *
* @param elements {@inheritDoc} * @param elements {@inheritDoc}
*/ */
public void build(List<?> elements) { @Override
public void build(XMLNode node) {
if (hasMembersToDocument()) { if (hasMembersToDocument()) {
super.build(elements); super.build(node);
} }
} }
......
...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds the summary for a given annotation type. * Builds the summary for a given annotation type.
...@@ -89,20 +88,6 @@ public class AnnotationTypeBuilder extends AbstractBuilder { ...@@ -89,20 +88,6 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
return builder; return builder;
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError("DEBUG: " + this.getClass().getName()
+ "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
...@@ -122,8 +107,8 @@ public class AnnotationTypeBuilder extends AbstractBuilder { ...@@ -122,8 +107,8 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* *
* @param elements the XML elements that specify how to document a class. * @param elements the XML elements that specify how to document a class.
*/ */
public void buildAnnotationTypeDoc(List<?> elements) throws Exception { public void buildAnnotationTypeDoc(XMLNode node) throws Exception {
build(elements); buildChildren(node);
writer.close(); writer.close();
copyDocFiles(); copyDocFiles();
} }
...@@ -154,7 +139,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder { ...@@ -154,7 +139,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
/** /**
* Build the header of the page. * Build the header of the page.
*/ */
public void buildAnnotationTypeHeader() { public void buildAnnotationTypeHeader(XMLNode node) {
writer.writeHeader(configuration.getText("doclet.AnnotationType") + writer.writeHeader(configuration.getText("doclet.AnnotationType") +
" " + annotationTypeDoc.name()); " " + annotationTypeDoc.name());
} }
...@@ -162,14 +147,14 @@ public class AnnotationTypeBuilder extends AbstractBuilder { ...@@ -162,14 +147,14 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
/** /**
* If this class is deprecated, print the appropriate information. * If this class is deprecated, print the appropriate information.
*/ */
public void buildDeprecationInfo () { public void buildDeprecationInfo (XMLNode node) {
writer.writeAnnotationTypeDeprecationInfo(); writer.writeAnnotationTypeDeprecationInfo();
} }
/** /**
* Build the signature of the current annotation type. * Build the signature of the current annotation type.
*/ */
public void buildAnnotationTypeSignature() { public void buildAnnotationTypeSignature(XMLNode node) {
StringBuffer modifiers = new StringBuffer( StringBuffer modifiers = new StringBuffer(
annotationTypeDoc.modifiers() + " "); annotationTypeDoc.modifiers() + " ");
writer.writeAnnotationTypeSignature( writer.writeAnnotationTypeSignature(
...@@ -180,14 +165,14 @@ public class AnnotationTypeBuilder extends AbstractBuilder { ...@@ -180,14 +165,14 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
/** /**
* Build the class description. * Build the class description.
*/ */
public void buildAnnotationTypeDescription() { public void buildAnnotationTypeDescription(XMLNode node) {
writer.writeAnnotationTypeDescription(); writer.writeAnnotationTypeDescription();
} }
/** /**
* Build the tag information for the current class. * Build the tag information for the current class.
*/ */
public void buildAnnotationTypeTagInfo() { public void buildAnnotationTypeTagInfo(XMLNode node) {
writer.writeAnnotationTypeTagInfo(); writer.writeAnnotationTypeTagInfo();
} }
...@@ -197,9 +182,9 @@ public class AnnotationTypeBuilder extends AbstractBuilder { ...@@ -197,9 +182,9 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a member summary is * @param elements the XML elements that specify how a member summary is
* documented. * documented.
*/ */
public void buildMemberSummary(List<?> elements) throws Exception { public void buildMemberSummary(XMLNode node) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getMemberSummaryBuilder(writer).build(elements); getMemberSummaryBuilder(writer).buildChildren(node);
writer.completeMemberSummaryBuild(); writer.completeMemberSummaryBuild();
} }
...@@ -209,10 +194,10 @@ public class AnnotationTypeBuilder extends AbstractBuilder { ...@@ -209,10 +194,10 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a annotation type * @param elements the XML elements that specify how a annotation type
* members are documented. * members are documented.
*/ */
public void buildAnnotationTypeOptionalMemberDetails(List<?> elements) public void buildAnnotationTypeOptionalMemberDetails(XMLNode node)
throws Exception { throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getAnnotationTypeOptionalMemberBuilder(writer).build(elements); getAnnotationTypeOptionalMemberBuilder(writer).buildChildren(node);
} }
/** /**
...@@ -221,17 +206,17 @@ public class AnnotationTypeBuilder extends AbstractBuilder { ...@@ -221,17 +206,17 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a annotation type * @param elements the XML elements that specify how a annotation type
* members are documented. * members are documented.
*/ */
public void buildAnnotationTypeRequiredMemberDetails(List<?> elements) public void buildAnnotationTypeRequiredMemberDetails(XMLNode node)
throws Exception { throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getAnnotationTypeRequiredMemberBuilder(writer).build(elements); getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node);
} }
/** /**
* Build the footer of the page. * Build the footer of the page.
*/ */
public void buildAnnotationTypeFooter() { public void buildAnnotationTypeFooter(XMLNode node) {
writer.writeFooter(); writer.writeFooter();
} }
} }
...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*; ...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds documentation for optional annotation type members. * Builds documentation for optional annotation type members.
...@@ -85,6 +84,7 @@ public class AnnotationTypeOptionalMemberBuilder extends ...@@ -85,6 +84,7 @@ public class AnnotationTypeOptionalMemberBuilder extends
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public String getName() { public String getName() {
return "AnnotationTypeOptionalMemberDetails"; return "AnnotationTypeOptionalMemberDetails";
} }
...@@ -95,34 +95,20 @@ public class AnnotationTypeOptionalMemberBuilder extends ...@@ -95,34 +95,20 @@ public class AnnotationTypeOptionalMemberBuilder extends
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildAnnotationTypeOptionalMember(List<?> elements) { public void buildAnnotationTypeOptionalMember(XMLNode node) {
if (writer == null) { if (writer == null) {
return; return;
} }
for (currentMemberIndex = 0; currentMemberIndex < members.size(); for (currentMemberIndex = 0; currentMemberIndex < members.size();
currentMemberIndex++) { currentMemberIndex++) {
build(elements); buildChildren(node);
} }
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError("DEBUG: " + this.getClass().getName()
+ "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Document the default value for this optional member. * Document the default value for this optional member.
*/ */
public void buildDefaultValueInfo() { public void buildDefaultValueInfo(XMLNode node) {
((AnnotationTypeOptionalMemberWriter) writer).writeDefaultValueInfo( ((AnnotationTypeOptionalMemberWriter) writer).writeDefaultValueInfo(
(MemberDoc) members.get(currentMemberIndex)); (MemberDoc) members.get(currentMemberIndex));
} }
...@@ -130,6 +116,7 @@ public class AnnotationTypeOptionalMemberBuilder extends ...@@ -130,6 +116,7 @@ public class AnnotationTypeOptionalMemberBuilder extends
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public AnnotationTypeRequiredMemberWriter getWriter() { public AnnotationTypeRequiredMemberWriter getWriter() {
return writer; return writer;
} }
......
...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*; ...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds documentation for required annotation type members. * Builds documentation for required annotation type members.
...@@ -113,20 +112,6 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder { ...@@ -113,20 +112,6 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
return "AnnotationTypeRequiredMemberDetails"; return "AnnotationTypeRequiredMemberDetails";
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError("DEBUG: " + this.getClass().getName()
+ "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Returns a list of members that will be documented for the given class. * Returns a list of members that will be documented for the given class.
* This information can be used for doclet specific documentation * This information can be used for doclet specific documentation
...@@ -161,20 +146,20 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder { ...@@ -161,20 +146,20 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildAnnotationTypeRequiredMember(List<?> elements) { public void buildAnnotationTypeRequiredMember(XMLNode node) {
if (writer == null) { if (writer == null) {
return; return;
} }
for (currentMemberIndex = 0; currentMemberIndex < members.size(); for (currentMemberIndex = 0; currentMemberIndex < members.size();
currentMemberIndex++) { currentMemberIndex++) {
build(elements); buildChildren(node);
} }
} }
/** /**
* Build the overall header. * Build the overall header.
*/ */
public void buildHeader() { public void buildHeader(XMLNode node) {
writer.writeHeader(classDoc, writer.writeHeader(classDoc,
configuration.getText("doclet.Annotation_Type_Member_Detail")); configuration.getText("doclet.Annotation_Type_Member_Detail"));
} }
...@@ -182,7 +167,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder { ...@@ -182,7 +167,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
/** /**
* Build the header for the individual members. * Build the header for the individual members.
*/ */
public void buildMemberHeader() { public void buildMemberHeader(XMLNode node) {
writer.writeMemberHeader((MemberDoc) members.get( writer.writeMemberHeader((MemberDoc) members.get(
currentMemberIndex), currentMemberIndex),
currentMemberIndex == 0); currentMemberIndex == 0);
...@@ -191,14 +176,14 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder { ...@@ -191,14 +176,14 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
/** /**
* Build the signature. * Build the signature.
*/ */
public void buildSignature() { public void buildSignature(XMLNode node) {
writer.writeSignature((MemberDoc) members.get(currentMemberIndex)); writer.writeSignature((MemberDoc) members.get(currentMemberIndex));
} }
/** /**
* Build the deprecation information. * Build the deprecation information.
*/ */
public void buildDeprecationInfo() { public void buildDeprecationInfo(XMLNode node) {
writer.writeDeprecated((MemberDoc) members.get(currentMemberIndex)); writer.writeDeprecated((MemberDoc) members.get(currentMemberIndex));
} }
...@@ -206,7 +191,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder { ...@@ -206,7 +191,7 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
* Build the comments for the member. Do nothing if * Build the comments for the member. Do nothing if
* {@link Configuration#nocomment} is set to true. * {@link Configuration#nocomment} is set to true.
*/ */
public void buildMemberComments() { public void buildMemberComments(XMLNode node) {
if(! configuration.nocomment){ if(! configuration.nocomment){
writer.writeComments((MemberDoc) members.get(currentMemberIndex)); writer.writeComments((MemberDoc) members.get(currentMemberIndex));
} }
...@@ -215,21 +200,21 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder { ...@@ -215,21 +200,21 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
/** /**
* Build the tag information. * Build the tag information.
*/ */
public void buildTagInfo() { public void buildTagInfo(XMLNode node) {
writer.writeTags((MemberDoc) members.get(currentMemberIndex)); writer.writeTags((MemberDoc) members.get(currentMemberIndex));
} }
/** /**
* Build the footer for the individual member. * Build the footer for the individual member.
*/ */
public void buildMemberFooter() { public void buildMemberFooter(XMLNode node) {
writer.writeMemberFooter(); writer.writeMemberFooter();
} }
/** /**
* Build the overall footer. * Build the overall footer.
*/ */
public void buildFooter() { public void buildFooter(XMLNode node) {
writer.writeFooter(classDoc); writer.writeFooter(classDoc);
} }
......
...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds the summary for a given class. * Builds the summary for a given class.
...@@ -105,20 +104,6 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -105,20 +104,6 @@ public class ClassBuilder extends AbstractBuilder {
return builder; return builder;
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError("DEBUG: " + this.getClass().getName()
+ "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
...@@ -138,8 +123,8 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -138,8 +123,8 @@ public class ClassBuilder extends AbstractBuilder {
* *
* @param elements the XML elements that specify how to document a class. * @param elements the XML elements that specify how to document a class.
*/ */
public void buildClassDoc(List<?> elements) throws Exception { public void buildClassDoc(XMLNode node) throws Exception {
build(elements); buildChildren(node);
writer.close(); writer.close();
copyDocFiles(); copyDocFiles();
} }
...@@ -169,7 +154,7 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -169,7 +154,7 @@ public class ClassBuilder extends AbstractBuilder {
/** /**
* Build the header of the page. * Build the header of the page.
*/ */
public void buildClassHeader() { public void buildClassHeader(XMLNode node) {
String key; String key;
if (isInterface) { if (isInterface) {
key = "doclet.Interface"; key = "doclet.Interface";
...@@ -185,7 +170,7 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -185,7 +170,7 @@ public class ClassBuilder extends AbstractBuilder {
/** /**
* Build the class tree documentation. * Build the class tree documentation.
*/ */
public void buildClassTree() { public void buildClassTree(XMLNode node) {
writer.writeClassTree(); writer.writeClassTree();
} }
...@@ -193,42 +178,42 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -193,42 +178,42 @@ public class ClassBuilder extends AbstractBuilder {
* If this is a class, list all interfaces * If this is a class, list all interfaces
* implemented by this class. * implemented by this class.
*/ */
public void buildImplementedInterfacesInfo() { public void buildImplementedInterfacesInfo(XMLNode node) {
writer.writeImplementedInterfacesInfo(); writer.writeImplementedInterfacesInfo();
} }
/** /**
* If this is an interface, list all super interfaces. * If this is an interface, list all super interfaces.
*/ */
public void buildSuperInterfacesInfo() { public void buildSuperInterfacesInfo(XMLNode node) {
writer.writeSuperInterfacesInfo(); writer.writeSuperInterfacesInfo();
} }
/** /**
* List the parameters of this class. * List the parameters of this class.
*/ */
public void buildTypeParamInfo() { public void buildTypeParamInfo(XMLNode node) {
writer.writeTypeParamInfo(); writer.writeTypeParamInfo();
} }
/** /**
* List all the classes extend this one. * List all the classes extend this one.
*/ */
public void buildSubClassInfo() { public void buildSubClassInfo(XMLNode node) {
writer.writeSubClassInfo(); writer.writeSubClassInfo();
} }
/** /**
* List all the interfaces that extend this one. * List all the interfaces that extend this one.
*/ */
public void buildSubInterfacesInfo() { public void buildSubInterfacesInfo(XMLNode node) {
writer.writeSubInterfacesInfo(); writer.writeSubInterfacesInfo();
} }
/** /**
* If this is an interface, list all classes that implement this interface. * If this is an interface, list all classes that implement this interface.
*/ */
public void buildInterfaceUsageInfo () { public void buildInterfaceUsageInfo (XMLNode node) {
writer.writeInterfaceUsageInfo(); writer.writeInterfaceUsageInfo();
} }
...@@ -236,21 +221,21 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -236,21 +221,21 @@ public class ClassBuilder extends AbstractBuilder {
* If this is an inner class or interface, list the enclosing class or * If this is an inner class or interface, list the enclosing class or
* interface. * interface.
*/ */
public void buildNestedClassInfo () { public void buildNestedClassInfo (XMLNode node) {
writer.writeNestedClassInfo(); writer.writeNestedClassInfo();
} }
/** /**
* If this class is deprecated, print the appropriate information. * If this class is deprecated, print the appropriate information.
*/ */
public void buildDeprecationInfo () { public void buildDeprecationInfo (XMLNode node) {
writer.writeClassDeprecationInfo(); writer.writeClassDeprecationInfo();
} }
/** /**
* Build the signature of the current class. * Build the signature of the current class.
*/ */
public void buildClassSignature() { public void buildClassSignature(XMLNode node) {
StringBuffer modifiers = new StringBuffer(classDoc.modifiers() + " "); StringBuffer modifiers = new StringBuffer(classDoc.modifiers() + " ");
if (isEnum) { if (isEnum) {
modifiers.append("enum "); modifiers.append("enum ");
...@@ -276,14 +261,14 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -276,14 +261,14 @@ public class ClassBuilder extends AbstractBuilder {
/** /**
* Build the class description. * Build the class description.
*/ */
public void buildClassDescription() { public void buildClassDescription(XMLNode node) {
writer.writeClassDescription(); writer.writeClassDescription();
} }
/** /**
* Build the tag information for the current class. * Build the tag information for the current class.
*/ */
public void buildClassTagInfo() { public void buildClassTagInfo(XMLNode node) {
writer.writeClassTagInfo(); writer.writeClassTagInfo();
} }
...@@ -293,9 +278,9 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -293,9 +278,9 @@ public class ClassBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a member summary is * @param elements the XML elements that specify how a member summary is
* documented. * documented.
*/ */
public void buildMemberSummary(List<?> elements) throws Exception { public void buildMemberSummary(XMLNode node) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getMemberSummaryBuilder(writer).build(elements); getMemberSummaryBuilder(writer).buildChildren(node);
writer.completeMemberSummaryBuild(); writer.completeMemberSummaryBuild();
} }
...@@ -305,9 +290,9 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -305,9 +290,9 @@ public class ClassBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how a enum constants are * @param elements the XML elements that specify how a enum constants are
* documented. * documented.
*/ */
public void buildEnumConstantsDetails(List<?> elements) throws Exception { public void buildEnumConstantsDetails(XMLNode node) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getEnumConstantsBuilder(writer).build(elements); getEnumConstantsBuilder(writer).buildChildren(node);
} }
/** /**
...@@ -315,9 +300,9 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -315,9 +300,9 @@ public class ClassBuilder extends AbstractBuilder {
* *
* @param elements the XML elements that specify how a field is documented. * @param elements the XML elements that specify how a field is documented.
*/ */
public void buildFieldDetails(List<?> elements) throws Exception { public void buildFieldDetails(XMLNode node) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getFieldBuilder(writer).build(elements); getFieldBuilder(writer).buildChildren(node);
} }
/** /**
...@@ -326,9 +311,9 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -326,9 +311,9 @@ public class ClassBuilder extends AbstractBuilder {
* @param elements the XML elements that specify how to document a * @param elements the XML elements that specify how to document a
* constructor. * constructor.
*/ */
public void buildConstructorDetails(List<?> elements) throws Exception { public void buildConstructorDetails(XMLNode node) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getConstructorBuilder(writer).build(elements); getConstructorBuilder(writer).buildChildren(node);
} }
/** /**
...@@ -336,15 +321,15 @@ public class ClassBuilder extends AbstractBuilder { ...@@ -336,15 +321,15 @@ public class ClassBuilder extends AbstractBuilder {
* *
* @param elements the XML elements that specify how a method is documented. * @param elements the XML elements that specify how a method is documented.
*/ */
public void buildMethodDetails(List<?> elements) throws Exception { public void buildMethodDetails(XMLNode node) throws Exception {
configuration.getBuilderFactory(). configuration.getBuilderFactory().
getMethodBuilder(writer).build(elements); getMethodBuilder(writer).buildChildren(node);
} }
/** /**
* Build the footer of the page. * Build the footer of the page.
*/ */
public void buildClassFooter() { public void buildClassFooter(XMLNode node) {
writer.writeFooter(); writer.writeFooter();
} }
} }
...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -30,7 +30,6 @@ import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds the Constants Summary Page. * Builds the Constants Summary Page.
...@@ -106,20 +105,6 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -106,20 +105,6 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
return builder; return builder;
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError("DEBUG: " + this.getClass().getName()
+ "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
...@@ -144,29 +129,29 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -144,29 +129,29 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* @param elements the list of elements describing constant summary * @param elements the list of elements describing constant summary
* documentation. * documentation.
*/ */
public void buildConstantSummary(List<?> elements) throws Exception { public void buildConstantSummary(XMLNode node) throws Exception {
build(elements); buildChildren(node);
writer.close(); writer.close();
} }
/** /**
* Build the header. * Build the header.
*/ */
public void buildHeader() { public void buildHeader(XMLNode node) {
writer.writeHeader(); writer.writeHeader();
} }
/** /**
* Build the footer. * Build the footer.
*/ */
public void buildFooter() { public void buildFooter(XMLNode node) {
writer.writeFooter(); writer.writeFooter();
} }
/** /**
* Build the table of contents. * Build the table of contents.
*/ */
public void buildContents() { public void buildContents(XMLNode node) {
writer.writeContentsHeader(); writer.writeContentsHeader();
PackageDoc[] packages = configuration.packages; PackageDoc[] packages = configuration.packages;
printedPackageHeaders = new HashSet<String>(); printedPackageHeaders = new HashSet<String>();
...@@ -186,14 +171,14 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -186,14 +171,14 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* @param elements the XML elements that represent the components * @param elements the XML elements that represent the components
* of documentation for each package. * of documentation for each package.
*/ */
public void buildConstantSummaries(List<?> elements) { public void buildConstantSummaries(XMLNode node) {
PackageDoc[] packages = configuration.packages; PackageDoc[] packages = configuration.packages;
printedPackageHeaders = new HashSet<String>(); printedPackageHeaders = new HashSet<String>();
for (int i = 0; i < packages.length; i++) { for (int i = 0; i < packages.length; i++) {
if (hasConstantField(packages[i])) { if (hasConstantField(packages[i])) {
currentPackage = packages[i]; currentPackage = packages[i];
//Build the documentation for the current package. //Build the documentation for the current package.
build(elements); buildChildren(node);
} }
} }
} }
...@@ -204,8 +189,8 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -204,8 +189,8 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* @param elements the list of XML elements that make up package * @param elements the list of XML elements that make up package
* documentation. * documentation.
*/ */
public void buildPackageConstantSummary(List<?> elements) { public void buildPackageConstantSummary(XMLNode node) {
build(elements); buildChildren(node);
} }
/** /**
...@@ -214,7 +199,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -214,7 +199,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* @param elements the list of XML elements that make up the class * @param elements the list of XML elements that make up the class
* constant summary. * constant summary.
*/ */
public void buildClassConstantSummary(List<?> elements) { public void buildClassConstantSummary(XMLNode node) {
ClassDoc[] classes = currentPackage.name().length() > 0 ? ClassDoc[] classes = currentPackage.name().length() > 0 ?
currentPackage.allClasses() : currentPackage.allClasses() :
configuration.classDocCatalog.allClasses( configuration.classDocCatalog.allClasses(
...@@ -227,14 +212,14 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -227,14 +212,14 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
} }
currentClass = classes[i]; currentClass = classes[i];
//Build the documentation for the current class. //Build the documentation for the current class.
build(elements); buildChildren(node);
} }
} }
/** /**
* Build the header for the given class. * Build the header for the given class.
*/ */
public void buildPackageHeader() { public void buildPackageHeader(XMLNode node) {
String parsedPackageName = parsePackageName(currentPackage.name()); String parsedPackageName = parsePackageName(currentPackage.name());
if (! printedPackageHeaders.contains(parsedPackageName)) { if (! printedPackageHeaders.contains(parsedPackageName)) {
writer.writePackageName(currentPackage, writer.writePackageName(currentPackage,
...@@ -246,7 +231,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -246,7 +231,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
/** /**
* Build the header for the given class. * Build the header for the given class.
*/ */
public void buildClassHeader() { public void buildClassHeader(XMLNode node) {
writer.writeConstantMembersHeader(currentClass); writer.writeConstantMembersHeader(currentClass);
} }
...@@ -254,14 +239,14 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -254,14 +239,14 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
* Print summary of constant members in the * Print summary of constant members in the
* class. * class.
*/ */
public void buildConstantMembers() { public void buildConstantMembers(XMLNode node) {
new ConstantFieldBuilder(currentClass).buildMembersSummary(); new ConstantFieldBuilder(currentClass).buildMembersSummary(node);
} }
/** /**
* Build the footer for the given class. * Build the footer for the given class.
*/ */
public void buildClassFooter() { public void buildClassFooter(XMLNode node) {
writer.writeConstantMembersFooter(currentClass); writer.writeConstantMembersFooter(currentClass);
} }
...@@ -362,7 +347,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder { ...@@ -362,7 +347,7 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
/** /**
* Builds the table of constants for a given class. * Builds the table of constants for a given class.
*/ */
protected void buildMembersSummary() { protected void buildMembersSummary(XMLNode node) {
List<FieldDoc> members = new ArrayList<FieldDoc>(members()); List<FieldDoc> members = new ArrayList<FieldDoc>(members());
if (members.size() > 0) { if (members.size() > 0) {
Collections.sort(members); Collections.sort(members);
......
...@@ -28,7 +28,6 @@ package com.sun.tools.doclets.internal.toolkit.builders; ...@@ -28,7 +28,6 @@ package com.sun.tools.doclets.internal.toolkit.builders;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.lang.reflect.*;
import java.util.*; import java.util.*;
/** /**
...@@ -133,22 +132,6 @@ public class ConstructorBuilder extends AbstractMemberBuilder { ...@@ -133,22 +132,6 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
return constructors.size() > 0; return constructors.size() > 0;
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(
String methodName,
Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError(
"DEBUG: " + this.getClass().getName() + "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Returns a list of constructors that will be documented for the given class. * Returns a list of constructors that will be documented for the given class.
* This information can be used for doclet specific documentation * This information can be used for doclet specific documentation
...@@ -175,21 +158,21 @@ public class ConstructorBuilder extends AbstractMemberBuilder { ...@@ -175,21 +158,21 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildConstructorDoc(List<?> elements) { public void buildConstructorDoc(XMLNode node) {
if (writer == null) { if (writer == null) {
return; return;
} }
for (currentMethodIndex = 0; for (currentMethodIndex = 0;
currentMethodIndex < constructors.size(); currentMethodIndex < constructors.size();
currentMethodIndex++) { currentMethodIndex++) {
build(elements); buildChildren(node);
} }
} }
/** /**
* Build the overall header. * Build the overall header.
*/ */
public void buildHeader() { public void buildHeader(XMLNode node) {
writer.writeHeader( writer.writeHeader(
classDoc, classDoc,
configuration.getText("doclet.Constructor_Detail")); configuration.getText("doclet.Constructor_Detail"));
...@@ -198,7 +181,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder { ...@@ -198,7 +181,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
/** /**
* Build the header for the individual constructor. * Build the header for the individual constructor.
*/ */
public void buildConstructorHeader() { public void buildConstructorHeader(XMLNode node) {
writer.writeConstructorHeader( writer.writeConstructorHeader(
(ConstructorDoc) constructors.get(currentMethodIndex), (ConstructorDoc) constructors.get(currentMethodIndex),
currentMethodIndex == 0); currentMethodIndex == 0);
...@@ -207,7 +190,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder { ...@@ -207,7 +190,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
/** /**
* Build the signature. * Build the signature.
*/ */
public void buildSignature() { public void buildSignature(XMLNode node) {
writer.writeSignature( writer.writeSignature(
(ConstructorDoc) constructors.get(currentMethodIndex)); (ConstructorDoc) constructors.get(currentMethodIndex));
} }
...@@ -215,7 +198,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder { ...@@ -215,7 +198,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
/** /**
* Build the deprecation information. * Build the deprecation information.
*/ */
public void buildDeprecationInfo() { public void buildDeprecationInfo(XMLNode node) {
writer.writeDeprecated( writer.writeDeprecated(
(ConstructorDoc) constructors.get(currentMethodIndex)); (ConstructorDoc) constructors.get(currentMethodIndex));
} }
...@@ -224,7 +207,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder { ...@@ -224,7 +207,7 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
* Build the comments for the constructor. Do nothing if * Build the comments for the constructor. Do nothing if
* {@link Configuration#nocomment} is set to true. * {@link Configuration#nocomment} is set to true.
*/ */
public void buildConstructorComments() { public void buildConstructorComments(XMLNode node) {
if (!configuration.nocomment) { if (!configuration.nocomment) {
writer.writeComments( writer.writeComments(
(ConstructorDoc) constructors.get(currentMethodIndex)); (ConstructorDoc) constructors.get(currentMethodIndex));
...@@ -234,21 +217,21 @@ public class ConstructorBuilder extends AbstractMemberBuilder { ...@@ -234,21 +217,21 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
/** /**
* Build the tag information. * Build the tag information.
*/ */
public void buildTagInfo() { public void buildTagInfo(XMLNode node) {
writer.writeTags((ConstructorDoc) constructors.get(currentMethodIndex)); writer.writeTags((ConstructorDoc) constructors.get(currentMethodIndex));
} }
/** /**
* Build the footer for the individual constructor. * Build the footer for the individual constructor.
*/ */
public void buildConstructorFooter() { public void buildConstructorFooter(XMLNode node) {
writer.writeConstructorFooter(); writer.writeConstructorFooter();
} }
/** /**
* Build the overall footer. * Build the overall footer.
*/ */
public void buildFooter() { public void buildFooter(XMLNode node) {
writer.writeFooter(classDoc); writer.writeFooter(classDoc);
} }
} }
...@@ -29,7 +29,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*; ...@@ -29,7 +29,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds documentation for a enum constants. * Builds documentation for a enum constants.
...@@ -115,22 +114,6 @@ public class EnumConstantBuilder extends AbstractMemberBuilder { ...@@ -115,22 +114,6 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
return "EnumConstantDetails"; return "EnumConstantDetails";
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(
String methodName,
Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError(
"DEBUG: " + this.getClass().getName() + "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Returns a list of enum constants that will be documented for the given class. * Returns a list of enum constants that will be documented for the given class.
* This information can be used for doclet specific documentation * This information can be used for doclet specific documentation
...@@ -165,21 +148,21 @@ public class EnumConstantBuilder extends AbstractMemberBuilder { ...@@ -165,21 +148,21 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildEnumConstant(List<?> elements) { public void buildEnumConstant(XMLNode node) {
if (writer == null) { if (writer == null) {
return; return;
} }
for (currentEnumConstantsIndex = 0; for (currentEnumConstantsIndex = 0;
currentEnumConstantsIndex < enumConstants.size(); currentEnumConstantsIndex < enumConstants.size();
currentEnumConstantsIndex++) { currentEnumConstantsIndex++) {
build(elements); buildChildren(node);
} }
} }
/** /**
* Build the overall header. * Build the overall header.
*/ */
public void buildHeader() { public void buildHeader(XMLNode node) {
writer.writeHeader( writer.writeHeader(
classDoc, classDoc,
configuration.getText("doclet.Enum_Constant_Detail")); configuration.getText("doclet.Enum_Constant_Detail"));
...@@ -188,7 +171,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder { ...@@ -188,7 +171,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
/** /**
* Build the header for the individual enum constants. * Build the header for the individual enum constants.
*/ */
public void buildEnumConstantHeader() { public void buildEnumConstantHeader(XMLNode node) {
writer.writeEnumConstantHeader( writer.writeEnumConstantHeader(
(FieldDoc) enumConstants.get(currentEnumConstantsIndex), (FieldDoc) enumConstants.get(currentEnumConstantsIndex),
currentEnumConstantsIndex == 0); currentEnumConstantsIndex == 0);
...@@ -197,7 +180,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder { ...@@ -197,7 +180,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
/** /**
* Build the signature. * Build the signature.
*/ */
public void buildSignature() { public void buildSignature(XMLNode node) {
writer.writeSignature( writer.writeSignature(
(FieldDoc) enumConstants.get(currentEnumConstantsIndex)); (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
} }
...@@ -205,7 +188,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder { ...@@ -205,7 +188,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
/** /**
* Build the deprecation information. * Build the deprecation information.
*/ */
public void buildDeprecationInfo() { public void buildDeprecationInfo(XMLNode node) {
writer.writeDeprecated( writer.writeDeprecated(
(FieldDoc) enumConstants.get(currentEnumConstantsIndex)); (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
} }
...@@ -214,7 +197,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder { ...@@ -214,7 +197,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
* Build the comments for the enum constant. Do nothing if * Build the comments for the enum constant. Do nothing if
* {@link Configuration#nocomment} is set to true. * {@link Configuration#nocomment} is set to true.
*/ */
public void buildEnumConstantComments() { public void buildEnumConstantComments(XMLNode node) {
if (!configuration.nocomment) { if (!configuration.nocomment) {
writer.writeComments( writer.writeComments(
(FieldDoc) enumConstants.get(currentEnumConstantsIndex)); (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
...@@ -224,7 +207,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder { ...@@ -224,7 +207,7 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
/** /**
* Build the tag information. * Build the tag information.
*/ */
public void buildTagInfo() { public void buildTagInfo(XMLNode node) {
writer.writeTags( writer.writeTags(
(FieldDoc) enumConstants.get(currentEnumConstantsIndex)); (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
} }
...@@ -232,14 +215,14 @@ public class EnumConstantBuilder extends AbstractMemberBuilder { ...@@ -232,14 +215,14 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
/** /**
* Build the footer for the individual enum constants. * Build the footer for the individual enum constants.
*/ */
public void buildEnumConstantFooter() { public void buildEnumConstantFooter(XMLNode node) {
writer.writeEnumConstantFooter(); writer.writeEnumConstantFooter();
} }
/** /**
* Build the overall footer. * Build the overall footer.
*/ */
public void buildFooter() { public void buildFooter(XMLNode node) {
writer.writeFooter(classDoc); writer.writeFooter(classDoc);
} }
......
...@@ -29,7 +29,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*; ...@@ -29,7 +29,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds documentation for a field. * Builds documentation for a field.
...@@ -116,22 +115,6 @@ public class FieldBuilder extends AbstractMemberBuilder { ...@@ -116,22 +115,6 @@ public class FieldBuilder extends AbstractMemberBuilder {
return "FieldDetails"; return "FieldDetails";
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(
String methodName,
Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError(
"DEBUG: " + this.getClass().getName() + "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Returns a list of fields that will be documented for the given class. * Returns a list of fields that will be documented for the given class.
* This information can be used for doclet specific documentation * This information can be used for doclet specific documentation
...@@ -166,21 +149,21 @@ public class FieldBuilder extends AbstractMemberBuilder { ...@@ -166,21 +149,21 @@ public class FieldBuilder extends AbstractMemberBuilder {
* @param elements the XML elements that specify how to construct this * @param elements the XML elements that specify how to construct this
* documentation. * documentation.
*/ */
public void buildFieldDoc(List<?> elements) { public void buildFieldDoc(XMLNode node) {
if (writer == null) { if (writer == null) {
return; return;
} }
for (currentFieldIndex = 0; for (currentFieldIndex = 0;
currentFieldIndex < fields.size(); currentFieldIndex < fields.size();
currentFieldIndex++) { currentFieldIndex++) {
build(elements); buildChildren(node);
} }
} }
/** /**
* Build the overall header. * Build the overall header.
*/ */
public void buildHeader() { public void buildHeader(XMLNode node) {
writer.writeHeader( writer.writeHeader(
classDoc, classDoc,
configuration.getText("doclet.Field_Detail")); configuration.getText("doclet.Field_Detail"));
...@@ -189,7 +172,7 @@ public class FieldBuilder extends AbstractMemberBuilder { ...@@ -189,7 +172,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
/** /**
* Build the header for the individual field. * Build the header for the individual field.
*/ */
public void buildFieldHeader() { public void buildFieldHeader(XMLNode node) {
writer.writeFieldHeader( writer.writeFieldHeader(
(FieldDoc) fields.get(currentFieldIndex), (FieldDoc) fields.get(currentFieldIndex),
currentFieldIndex == 0); currentFieldIndex == 0);
...@@ -198,14 +181,14 @@ public class FieldBuilder extends AbstractMemberBuilder { ...@@ -198,14 +181,14 @@ public class FieldBuilder extends AbstractMemberBuilder {
/** /**
* Build the signature. * Build the signature.
*/ */
public void buildSignature() { public void buildSignature(XMLNode node) {
writer.writeSignature((FieldDoc) fields.get(currentFieldIndex)); writer.writeSignature((FieldDoc) fields.get(currentFieldIndex));
} }
/** /**
* Build the deprecation information. * Build the deprecation information.
*/ */
public void buildDeprecationInfo() { public void buildDeprecationInfo(XMLNode node) {
writer.writeDeprecated((FieldDoc) fields.get(currentFieldIndex)); writer.writeDeprecated((FieldDoc) fields.get(currentFieldIndex));
} }
...@@ -213,7 +196,7 @@ public class FieldBuilder extends AbstractMemberBuilder { ...@@ -213,7 +196,7 @@ public class FieldBuilder extends AbstractMemberBuilder {
* Build the comments for the field. Do nothing if * Build the comments for the field. Do nothing if
* {@link Configuration#nocomment} is set to true. * {@link Configuration#nocomment} is set to true.
*/ */
public void buildFieldComments() { public void buildFieldComments(XMLNode node) {
if (!configuration.nocomment) { if (!configuration.nocomment) {
writer.writeComments((FieldDoc) fields.get(currentFieldIndex)); writer.writeComments((FieldDoc) fields.get(currentFieldIndex));
} }
...@@ -222,21 +205,21 @@ public class FieldBuilder extends AbstractMemberBuilder { ...@@ -222,21 +205,21 @@ public class FieldBuilder extends AbstractMemberBuilder {
/** /**
* Build the tag information. * Build the tag information.
*/ */
public void buildTagInfo() { public void buildTagInfo(XMLNode node) {
writer.writeTags((FieldDoc) fields.get(currentFieldIndex)); writer.writeTags((FieldDoc) fields.get(currentFieldIndex));
} }
/** /**
* Build the footer for the individual field. * Build the footer for the individual field.
*/ */
public void buildFieldFooter() { public void buildFieldFooter(XMLNode node) {
writer.writeFieldFooter(); writer.writeFieldFooter();
} }
/** /**
* Build the overall footer. * Build the overall footer.
*/ */
public void buildFooter() { public void buildFooter(XMLNode node) {
writer.writeFooter(classDoc); writer.writeFooter(classDoc);
} }
......
...@@ -45,8 +45,8 @@ public class LayoutParser extends DefaultHandler { ...@@ -45,8 +45,8 @@ public class LayoutParser extends DefaultHandler {
/** /**
* The map of XML elements that have been parsed. * The map of XML elements that have been parsed.
*/ */
private Map<String,List<Object>> xmlElementsMap; private Map<String,XMLNode> xmlElementsMap;
private XMLNode currentNode;
private Configuration configuration; private Configuration configuration;
private static LayoutParser instance; private static LayoutParser instance;
private String currentRoot; private String currentRoot;
...@@ -56,7 +56,7 @@ public class LayoutParser extends DefaultHandler { ...@@ -56,7 +56,7 @@ public class LayoutParser extends DefaultHandler {
* This class is a singleton. * This class is a singleton.
*/ */
private LayoutParser(Configuration configuration) { private LayoutParser(Configuration configuration) {
xmlElementsMap = new HashMap<String,List<Object>>(); xmlElementsMap = new HashMap<String,XMLNode>();
this.configuration = configuration; this.configuration = configuration;
} }
...@@ -78,20 +78,18 @@ public class LayoutParser extends DefaultHandler { ...@@ -78,20 +78,18 @@ public class LayoutParser extends DefaultHandler {
* *
* @return List the list of XML elements parsed. * @return List the list of XML elements parsed.
*/ */
public List<?> parseXML(String root) { public XMLNode parseXML(String root) {
if (xmlElementsMap.containsKey(root)) { if (xmlElementsMap.containsKey(root)) {
return xmlElementsMap.get(root); return xmlElementsMap.get(root);
} }
try { try {
List<Object> xmlElements = new ArrayList<Object>();
xmlElementsMap.put(root, xmlElements);
currentRoot = root; currentRoot = root;
isParsing = false; isParsing = false;
SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser(); SAXParser saxParser = factory.newSAXParser();
InputStream in = configuration.getBuilderXML(); InputStream in = configuration.getBuilderXML();
saxParser.parse(in, this); saxParser.parse(in, this);
return xmlElements; return xmlElementsMap.get(root);
} catch (Throwable t) { } catch (Throwable t) {
t.printStackTrace(); t.printStackTrace();
throw new DocletAbortException(); throw new DocletAbortException();
...@@ -101,39 +99,30 @@ public class LayoutParser extends DefaultHandler { ...@@ -101,39 +99,30 @@ public class LayoutParser extends DefaultHandler {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public void startElement(String namespaceURI, String sName, String qName, public void startElement(String namespaceURI, String sName, String qName,
Attributes attrs) Attributes attrs)
throws SAXException { throws SAXException {
if (isParsing || qName.equals(currentRoot)) { if (isParsing || qName.equals(currentRoot)) {
isParsing = true; isParsing = true;
List<Object> xmlElements = xmlElementsMap.get(currentRoot); currentNode = new XMLNode(currentNode, qName);
xmlElements.add(qName); for (int i = 0; i < attrs.getLength(); i++)
currentNode.attrs.put(attrs.getLocalName(i), attrs.getValue(i));
if (qName.equals(currentRoot))
xmlElementsMap.put(qName, currentNode);
} }
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public void endElement(String namespaceURI, String sName, String qName) public void endElement(String namespaceURI, String sName, String qName)
throws SAXException { throws SAXException {
if (! isParsing) { if (! isParsing) {
isParsing = false;
return;
}
List<Object> xmlElements = xmlElementsMap.get(currentRoot);
if (xmlElements.get(xmlElements.size()-1).equals(qName)) {
return; return;
} else {
List<Object> subElements = new ArrayList<Object>();
int targetIndex = xmlElements.indexOf(qName);
int size = xmlElements.size();
for (int i = targetIndex; i < size; i++) {
subElements.add(xmlElements.get(targetIndex));
xmlElements.remove(targetIndex);
}
//Save the sub elements as a list.
xmlElements.add(subElements);
} }
currentNode = currentNode.parent;
isParsing = ! qName.equals(currentRoot); isParsing = ! qName.equals(currentRoot);
} }
} }
...@@ -29,7 +29,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*; ...@@ -29,7 +29,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds the member summary. * Builds the member summary.
...@@ -174,22 +173,6 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -174,22 +173,6 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
return visibleMemberMaps[type].getLeafClassMembers(configuration); return visibleMemberMaps[type].getLeafClassMembers(configuration);
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(
String methodName,
Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError(
"DEBUG: " + this.getClass().getName() + "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Return true it there are any members to summarize. * Return true it there are any members to summarize.
* *
...@@ -211,7 +194,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -211,7 +194,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the summary for the enum constants. * Build the summary for the enum constants.
*/ */
public void buildEnumConstantsSummary() { public void buildEnumConstantsSummary(XMLNode node) {
buildSummary( buildSummary(
memberSummaryWriters[VisibleMemberMap.ENUM_CONSTANTS], memberSummaryWriters[VisibleMemberMap.ENUM_CONSTANTS],
visibleMemberMaps[VisibleMemberMap.ENUM_CONSTANTS]); visibleMemberMaps[VisibleMemberMap.ENUM_CONSTANTS]);
...@@ -220,7 +203,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -220,7 +203,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the summary for the optional members. * Build the summary for the optional members.
*/ */
public void buildAnnotationTypeOptionalMemberSummary() { public void buildAnnotationTypeOptionalMemberSummary(XMLNode node) {
buildSummary( buildSummary(
memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL], memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL],
visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL]); visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL]);
...@@ -229,7 +212,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -229,7 +212,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the summary for the optional members. * Build the summary for the optional members.
*/ */
public void buildAnnotationTypeRequiredMemberSummary() { public void buildAnnotationTypeRequiredMemberSummary(XMLNode node) {
buildSummary( buildSummary(
memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED], memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED],
visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]); visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]);
...@@ -238,7 +221,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -238,7 +221,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the summary for the fields. * Build the summary for the fields.
*/ */
public void buildFieldsSummary() { public void buildFieldsSummary(XMLNode node) {
buildSummary( buildSummary(
memberSummaryWriters[VisibleMemberMap.FIELDS], memberSummaryWriters[VisibleMemberMap.FIELDS],
visibleMemberMaps[VisibleMemberMap.FIELDS]); visibleMemberMaps[VisibleMemberMap.FIELDS]);
...@@ -247,7 +230,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -247,7 +230,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the inherited summary for the fields. * Build the inherited summary for the fields.
*/ */
public void buildFieldsInheritedSummary() { public void buildFieldsInheritedSummary(XMLNode node) {
buildInheritedSummary( buildInheritedSummary(
memberSummaryWriters[VisibleMemberMap.FIELDS], memberSummaryWriters[VisibleMemberMap.FIELDS],
visibleMemberMaps[VisibleMemberMap.FIELDS]); visibleMemberMaps[VisibleMemberMap.FIELDS]);
...@@ -256,7 +239,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -256,7 +239,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the summary for the nested classes. * Build the summary for the nested classes.
*/ */
public void buildNestedClassesSummary() { public void buildNestedClassesSummary(XMLNode node) {
buildSummary( buildSummary(
memberSummaryWriters[VisibleMemberMap.INNERCLASSES], memberSummaryWriters[VisibleMemberMap.INNERCLASSES],
visibleMemberMaps[VisibleMemberMap.INNERCLASSES]); visibleMemberMaps[VisibleMemberMap.INNERCLASSES]);
...@@ -265,7 +248,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -265,7 +248,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the inherited summary for the nested classes. * Build the inherited summary for the nested classes.
*/ */
public void buildNestedClassesInheritedSummary() { public void buildNestedClassesInheritedSummary(XMLNode node) {
buildInheritedSummary( buildInheritedSummary(
memberSummaryWriters[VisibleMemberMap.INNERCLASSES], memberSummaryWriters[VisibleMemberMap.INNERCLASSES],
visibleMemberMaps[VisibleMemberMap.INNERCLASSES]); visibleMemberMaps[VisibleMemberMap.INNERCLASSES]);
...@@ -274,7 +257,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -274,7 +257,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the method summary. * Build the method summary.
*/ */
public void buildMethodsSummary() { public void buildMethodsSummary(XMLNode node) {
buildSummary( buildSummary(
memberSummaryWriters[VisibleMemberMap.METHODS], memberSummaryWriters[VisibleMemberMap.METHODS],
visibleMemberMaps[VisibleMemberMap.METHODS]); visibleMemberMaps[VisibleMemberMap.METHODS]);
...@@ -283,7 +266,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -283,7 +266,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the inherited method summary. * Build the inherited method summary.
*/ */
public void buildMethodsInheritedSummary() { public void buildMethodsInheritedSummary(XMLNode node) {
buildInheritedSummary( buildInheritedSummary(
memberSummaryWriters[VisibleMemberMap.METHODS], memberSummaryWriters[VisibleMemberMap.METHODS],
visibleMemberMaps[VisibleMemberMap.METHODS]); visibleMemberMaps[VisibleMemberMap.METHODS]);
...@@ -292,7 +275,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder { ...@@ -292,7 +275,7 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
/** /**
* Build the constructor summary. * Build the constructor summary.
*/ */
public void buildConstructorsSummary() { public void buildConstructorsSummary(XMLNode node) {
buildSummary( buildSummary(
memberSummaryWriters[VisibleMemberMap.CONSTRUCTORS], memberSummaryWriters[VisibleMemberMap.CONSTRUCTORS],
visibleMemberMaps[VisibleMemberMap.CONSTRUCTORS]); visibleMemberMaps[VisibleMemberMap.CONSTRUCTORS]);
......
...@@ -29,7 +29,7 @@ import com.sun.tools.doclets.internal.toolkit.util.*; ...@@ -29,7 +29,7 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.util.*; import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds documentation for a method. * Builds documentation for a method.
* *
...@@ -111,22 +111,6 @@ public class MethodBuilder extends AbstractMemberBuilder { ...@@ -111,22 +111,6 @@ public class MethodBuilder extends AbstractMemberBuilder {
return "MethodDetails"; return "MethodDetails";
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(
String methodName,
Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError(
"DEBUG: " + this.getClass().getName() + "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Returns a list of methods that will be documented for the given class. * Returns a list of methods that will be documented for the given class.
* This information can be used for doclet specific documentation * This information can be used for doclet specific documentation
...@@ -158,21 +142,21 @@ public class MethodBuilder extends AbstractMemberBuilder { ...@@ -158,21 +142,21 @@ public class MethodBuilder extends AbstractMemberBuilder {
/** /**
* Build the method documentation. * Build the method documentation.
*/ */
public void buildMethodDoc(List<?> elements) { public void buildMethodDoc(XMLNode node) {
if (writer == null) { if (writer == null) {
return; return;
} }
for (currentMethodIndex = 0; for (currentMethodIndex = 0;
currentMethodIndex < methods.size(); currentMethodIndex < methods.size();
currentMethodIndex++) { currentMethodIndex++) {
build(elements); buildChildren(node);
} }
} }
/** /**
* Build the overall header. * Build the overall header.
*/ */
public void buildHeader() { public void buildHeader(XMLNode node) {
writer.writeHeader( writer.writeHeader(
classDoc, classDoc,
configuration.getText("doclet.Method_Detail")); configuration.getText("doclet.Method_Detail"));
...@@ -181,7 +165,7 @@ public class MethodBuilder extends AbstractMemberBuilder { ...@@ -181,7 +165,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
/** /**
* Build the header for the individual method. * Build the header for the individual method.
*/ */
public void buildMethodHeader() { public void buildMethodHeader(XMLNode node) {
writer.writeMethodHeader( writer.writeMethodHeader(
(MethodDoc) methods.get(currentMethodIndex), (MethodDoc) methods.get(currentMethodIndex),
currentMethodIndex == 0); currentMethodIndex == 0);
...@@ -190,14 +174,14 @@ public class MethodBuilder extends AbstractMemberBuilder { ...@@ -190,14 +174,14 @@ public class MethodBuilder extends AbstractMemberBuilder {
/** /**
* Build the signature. * Build the signature.
*/ */
public void buildSignature() { public void buildSignature(XMLNode node) {
writer.writeSignature((MethodDoc) methods.get(currentMethodIndex)); writer.writeSignature((MethodDoc) methods.get(currentMethodIndex));
} }
/** /**
* Build the deprecation information. * Build the deprecation information.
*/ */
public void buildDeprecationInfo() { public void buildDeprecationInfo(XMLNode node) {
writer.writeDeprecated((MethodDoc) methods.get(currentMethodIndex)); writer.writeDeprecated((MethodDoc) methods.get(currentMethodIndex));
} }
...@@ -205,7 +189,7 @@ public class MethodBuilder extends AbstractMemberBuilder { ...@@ -205,7 +189,7 @@ public class MethodBuilder extends AbstractMemberBuilder {
* Build the comments for the method. Do nothing if * Build the comments for the method. Do nothing if
* {@link Configuration#nocomment} is set to true. If this method * {@link Configuration#nocomment} is set to true. If this method
*/ */
public void buildMethodComments() { public void buildMethodComments(XMLNode node) {
if (!configuration.nocomment) { if (!configuration.nocomment) {
MethodDoc method = (MethodDoc) methods.get(currentMethodIndex); MethodDoc method = (MethodDoc) methods.get(currentMethodIndex);
...@@ -228,21 +212,21 @@ public class MethodBuilder extends AbstractMemberBuilder { ...@@ -228,21 +212,21 @@ public class MethodBuilder extends AbstractMemberBuilder {
/** /**
* Build the tag information. * Build the tag information.
*/ */
public void buildTagInfo() { public void buildTagInfo(XMLNode node) {
writer.writeTags((MethodDoc) methods.get(currentMethodIndex)); writer.writeTags((MethodDoc) methods.get(currentMethodIndex));
} }
/** /**
* Build the footer of the method. * Build the footer of the method.
*/ */
public void buildMethodFooter() { public void buildMethodFooter(XMLNode node) {
writer.writeMethodFooter(); writer.writeMethodFooter();
} }
/** /**
* Build the overall footer. * Build the overall footer.
*/ */
public void buildFooter() { public void buildFooter(XMLNode node) {
writer.writeFooter(classDoc); writer.writeFooter(classDoc);
} }
......
...@@ -29,8 +29,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*; ...@@ -29,8 +29,6 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.io.*; import java.io.*;
import java.util.*;
import java.lang.reflect.*;
/** /**
* Builds the summary for a given package. * Builds the summary for a given package.
...@@ -84,22 +82,6 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -84,22 +82,6 @@ public class PackageSummaryBuilder extends AbstractBuilder {
return builder; return builder;
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(
String methodName,
Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError(
"DEBUG: " + this.getClass().getName() + "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Build the package summary. * Build the package summary.
*/ */
...@@ -121,8 +103,8 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -121,8 +103,8 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the package documentation. * Build the package documentation.
*/ */
public void buildPackageDoc(List<?> elements) throws Exception { public void buildPackageDoc(XMLNode node) throws Exception {
build(elements); buildChildren(node);
packageWriter.close(); packageWriter.close();
Util.copyDocFiles( Util.copyDocFiles(
configuration, configuration,
...@@ -136,14 +118,14 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -136,14 +118,14 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the header of the summary. * Build the header of the summary.
*/ */
public void buildPackageHeader() { public void buildPackageHeader(XMLNode node) {
packageWriter.writePackageHeader(Util.getPackageName(packageDoc)); packageWriter.writePackageHeader(Util.getPackageName(packageDoc));
} }
/** /**
* Build the description of the summary. * Build the description of the summary.
*/ */
public void buildPackageDescription() { public void buildPackageDescription(XMLNode node) {
if (configuration.nocomment) { if (configuration.nocomment) {
return; return;
} }
...@@ -153,7 +135,7 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -153,7 +135,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the tags of the summary. * Build the tags of the summary.
*/ */
public void buildPackageTags() { public void buildPackageTags(XMLNode node) {
if (configuration.nocomment) { if (configuration.nocomment) {
return; return;
} }
...@@ -163,28 +145,28 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -163,28 +145,28 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the package summary. * Build the package summary.
*/ */
public void buildSummary(List<?> elements) { public void buildSummary(XMLNode node) {
build(elements); buildChildren(node);
} }
/** /**
* Build the overall header. * Build the overall header.
*/ */
public void buildSummaryHeader() { public void buildSummaryHeader(XMLNode node) {
packageWriter.writeSummaryHeader(); packageWriter.writeSummaryHeader();
} }
/** /**
* Build the overall footer. * Build the overall footer.
*/ */
public void buildSummaryFooter() { public void buildSummaryFooter(XMLNode node) {
packageWriter.writeSummaryFooter(); packageWriter.writeSummaryFooter();
} }
/** /**
* Build the summary for the classes in this package. * Build the summary for the classes in this package.
*/ */
public void buildClassSummary() { public void buildClassSummary(XMLNode node) {
String classTableSummary = String classTableSummary =
configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Member_Table_Summary",
configuration.getText("doclet.Class_Summary"), configuration.getText("doclet.Class_Summary"),
...@@ -209,7 +191,7 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -209,7 +191,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the summary for the interfaces in this package. * Build the summary for the interfaces in this package.
*/ */
public void buildInterfaceSummary() { public void buildInterfaceSummary(XMLNode node) {
String interfaceTableSummary = String interfaceTableSummary =
configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Member_Table_Summary",
configuration.getText("doclet.Interface_Summary"), configuration.getText("doclet.Interface_Summary"),
...@@ -234,7 +216,7 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -234,7 +216,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the summary for the enums in this package. * Build the summary for the enums in this package.
*/ */
public void buildAnnotationTypeSummary() { public void buildAnnotationTypeSummary(XMLNode node) {
String annotationtypeTableSummary = String annotationtypeTableSummary =
configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Member_Table_Summary",
configuration.getText("doclet.Annotation_Types_Summary"), configuration.getText("doclet.Annotation_Types_Summary"),
...@@ -259,7 +241,7 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -259,7 +241,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the summary for the enums in this package. * Build the summary for the enums in this package.
*/ */
public void buildEnumSummary() { public void buildEnumSummary(XMLNode node) {
String enumTableSummary = String enumTableSummary =
configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Member_Table_Summary",
configuration.getText("doclet.Enum_Summary"), configuration.getText("doclet.Enum_Summary"),
...@@ -284,7 +266,7 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -284,7 +266,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the summary for the exceptions in this package. * Build the summary for the exceptions in this package.
*/ */
public void buildExceptionSummary() { public void buildExceptionSummary(XMLNode node) {
String exceptionTableSummary = String exceptionTableSummary =
configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Member_Table_Summary",
configuration.getText("doclet.Exception_Summary"), configuration.getText("doclet.Exception_Summary"),
...@@ -309,7 +291,7 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -309,7 +291,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the summary for the errors in this package. * Build the summary for the errors in this package.
*/ */
public void buildErrorSummary() { public void buildErrorSummary(XMLNode node) {
String errorTableSummary = String errorTableSummary =
configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Member_Table_Summary",
configuration.getText("doclet.Error_Summary"), configuration.getText("doclet.Error_Summary"),
...@@ -334,7 +316,7 @@ public class PackageSummaryBuilder extends AbstractBuilder { ...@@ -334,7 +316,7 @@ public class PackageSummaryBuilder extends AbstractBuilder {
/** /**
* Build the footer of the summary. * Build the footer of the summary.
*/ */
public void buildPackageFooter() { public void buildPackageFooter(XMLNode node) {
packageWriter.writePackageFooter(); packageWriter.writePackageFooter();
} }
} }
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.doclets.internal.toolkit.builders; package com.sun.tools.doclets.internal.toolkit.builders;
import java.io.*; import java.io.*;
import java.lang.reflect.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
...@@ -132,47 +131,33 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -132,47 +131,33 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the serialized form. * Build the serialized form.
*/ */
public void buildSerializedForm(List<?> elements) throws Exception { public void buildSerializedForm(XMLNode node) throws Exception {
build(elements); buildChildren(node);
writer.close(); writer.close();
} }
/**
* {@inheritDoc}
*/
public void invokeMethod(String methodName, Class<?>[] paramClasses,
Object[] params)
throws Exception {
if (DEBUG) {
configuration.root.printError("DEBUG: " + this.getClass().getName()
+ "." + methodName);
}
Method method = this.getClass().getMethod(methodName, paramClasses);
method.invoke(this, params);
}
/** /**
* Build the header. * Build the header.
*/ */
public void buildHeader() { public void buildHeader(XMLNode node) {
writer.writeHeader(configuration.getText("doclet.Serialized_Form")); writer.writeHeader(configuration.getText("doclet.Serialized_Form"));
} }
/** /**
* Build the contents. * Build the contents.
*/ */
public void buildSerializedFormSummaries(List<?> elements) { public void buildSerializedFormSummaries(XMLNode node) {
PackageDoc[] packages = configuration.packages; PackageDoc[] packages = configuration.packages;
for (int i = 0; i < packages.length; i++) { for (int i = 0; i < packages.length; i++) {
currentPackage = packages[i]; currentPackage = packages[i];
build(elements); buildChildren(node);
} }
} }
/** /**
* Build the package serialized for for the current package being processed. * Build the package serialized for for the current package being processed.
*/ */
public void buildPackageSerializedForm(List<?> elements) { public void buildPackageSerializedForm(XMLNode node) {
String foo = currentPackage.name(); String foo = currentPackage.name();
ClassDoc[] classes = currentPackage.allClasses(false); ClassDoc[] classes = currentPackage.allClasses(false);
if (classes == null || classes.length == 0) { if (classes == null || classes.length == 0) {
...@@ -184,14 +169,14 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -184,14 +169,14 @@ public class SerializedFormBuilder extends AbstractBuilder {
if (!serialClassFoundToDocument(classes)) { if (!serialClassFoundToDocument(classes)) {
return; return;
} }
build(elements); buildChildren(node);
} }
public void buildPackageHeader() { public void buildPackageHeader(XMLNode node) {
writer.writePackageHeader(Util.getPackageName(currentPackage)); writer.writePackageHeader(Util.getPackageName(currentPackage));
} }
public void buildClassSerializedForm(List<?> elements) { public void buildClassSerializedForm(XMLNode node) {
ClassDoc[] classes = currentPackage.allClasses(false); ClassDoc[] classes = currentPackage.allClasses(false);
Arrays.sort(classes); Arrays.sort(classes);
for (int j = 0; j < classes.length; j++) { for (int j = 0; j < classes.length; j++) {
...@@ -202,19 +187,19 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -202,19 +187,19 @@ public class SerializedFormBuilder extends AbstractBuilder {
if(!serialClassInclude(currentClass)) { if(!serialClassInclude(currentClass)) {
continue; continue;
} }
build(elements); buildChildren(node);
} }
} }
} }
public void buildClassHeader() { public void buildClassHeader(XMLNode node) {
writer.writeClassHeader(currentClass); writer.writeClassHeader(currentClass);
} }
/** /**
* Build the serial UID information for the given class. * Build the serial UID information for the given class.
*/ */
public void buildSerialUIDInfo() { public void buildSerialUIDInfo(XMLNode node) {
FieldDoc[] fields = currentClass.fields(false); FieldDoc[] fields = currentClass.fields(false);
for (int i = 0; i < fields.length; i++) { for (int i = 0; i < fields.length; i++) {
if (fields[i].name().equals("serialVersionUID") && if (fields[i].name().equals("serialVersionUID") &&
...@@ -229,7 +214,7 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -229,7 +214,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the footer. * Build the footer.
*/ */
public void buildFooter() { public void buildFooter(XMLNode node) {
writer.writeFooter(); writer.writeFooter();
} }
...@@ -316,7 +301,7 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -316,7 +301,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the method header. * Build the method header.
*/ */
public void buildMethodHeader() { public void buildMethodHeader(XMLNode node) {
if (currentClass.serializationMethods().length > 0) { if (currentClass.serializationMethods().length > 0) {
methodWriter.writeHeader( methodWriter.writeHeader(
configuration.getText("doclet.Serialized_Form_methods")); configuration.getText("doclet.Serialized_Form_methods"));
...@@ -333,28 +318,28 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -333,28 +318,28 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the method sub header. * Build the method sub header.
*/ */
public void buildMethodSubHeader() { public void buildMethodSubHeader(XMLNode node) {
methodWriter.writeMemberHeader((MethodDoc) currentMember); methodWriter.writeMemberHeader((MethodDoc) currentMember);
} }
/** /**
* Build the deprecated method description. * Build the deprecated method description.
*/ */
public void buildDeprecatedMethodInfo() { public void buildDeprecatedMethodInfo(XMLNode node) {
methodWriter.writeDeprecatedMemberInfo((MethodDoc) currentMember); methodWriter.writeDeprecatedMemberInfo((MethodDoc) currentMember);
} }
/** /**
* Build method tags. * Build method tags.
*/ */
public void buildMethodDescription() { public void buildMethodDescription(XMLNode node) {
methodWriter.writeMemberDescription((MethodDoc) currentMember); methodWriter.writeMemberDescription((MethodDoc) currentMember);
} }
/** /**
* Build the method tags. * Build the method tags.
*/ */
public void buildMethodTags() { public void buildMethodTags(XMLNode node) {
methodWriter.writeMemberTags((MethodDoc) currentMember); methodWriter.writeMemberTags((MethodDoc) currentMember);
MethodDoc method = (MethodDoc)currentMember; MethodDoc method = (MethodDoc)currentMember;
if (method.name().compareTo("writeExternal") == 0 if (method.name().compareTo("writeExternal") == 0
...@@ -370,24 +355,24 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -370,24 +355,24 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* build the information for the method. * build the information for the method.
*/ */
public void buildMethodInfo(List<?> elements) { public void buildMethodInfo(XMLNode node) {
if(configuration.nocomment){ if(configuration.nocomment){
return; return;
} }
build(elements); buildChildren(node);
} }
/** /**
* Build the method footer. * Build the method footer.
*/ */
public void buildMethodFooter() { public void buildMethodFooter(XMLNode node) {
methodWriter.writeMemberFooter(); methodWriter.writeMemberFooter();
} }
/** /**
* Build the field header. * Build the field header.
*/ */
public void buildFieldHeader() { public void buildFieldHeader(XMLNode node) {
if (currentClass.serializableFields().length > 0) { if (currentClass.serializableFields().length > 0) {
buildFieldSerializationOverview(currentClass); buildFieldSerializationOverview(currentClass);
fieldWriter.writeHeader(configuration.getText( fieldWriter.writeHeader(configuration.getText(
...@@ -426,7 +411,7 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -426,7 +411,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the field sub header. * Build the field sub header.
*/ */
public void buildFieldSubHeader() { public void buildFieldSubHeader(XMLNode node) {
if (! currentClass.definesSerializableFields() ){ if (! currentClass.definesSerializableFields() ){
FieldDoc field = (FieldDoc) currentMember; FieldDoc field = (FieldDoc) currentMember;
fieldWriter.writeMemberHeader(field.type().asClassDoc(), fieldWriter.writeMemberHeader(field.type().asClassDoc(),
...@@ -437,7 +422,7 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -437,7 +422,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the field deprecation information. * Build the field deprecation information.
*/ */
public void buildFieldDeprecationInfo() { public void buildFieldDeprecationInfo(XMLNode node) {
if (!currentClass.definesSerializableFields()) { if (!currentClass.definesSerializableFields()) {
FieldDoc field = (FieldDoc)currentMember; FieldDoc field = (FieldDoc)currentMember;
fieldWriter.writeMemberDeprecatedInfo(field); fieldWriter.writeMemberDeprecatedInfo(field);
...@@ -447,7 +432,7 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -447,7 +432,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the field information. * Build the field information.
*/ */
public void buildFieldInfo() { public void buildFieldInfo(XMLNode node) {
if(configuration.nocomment){ if(configuration.nocomment){
return; return;
} }
...@@ -483,7 +468,7 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -483,7 +468,7 @@ public class SerializedFormBuilder extends AbstractBuilder {
/** /**
* Build the field sub footer. * Build the field sub footer.
*/ */
public void buildFieldSubFooter() { public void buildFieldSubFooter(XMLNode node) {
if (! currentClass.definesSerializableFields()) { if (! currentClass.definesSerializableFields()) {
fieldWriter.writeMemberFooter(); fieldWriter.writeMemberFooter();
} }
...@@ -493,12 +478,12 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -493,12 +478,12 @@ public class SerializedFormBuilder extends AbstractBuilder {
* Build the summaries for the methods that belong to the given * Build the summaries for the methods that belong to the given
* class. * class.
*/ */
public void buildSerializableMethods(List<?> elements) { public void buildSerializableMethods(XMLNode node) {
MemberDoc[] members = currentClass.serializationMethods(); MemberDoc[] members = currentClass.serializationMethods();
if (members.length > 0) { if (members.length > 0) {
for (int i = 0; i < members.length; i++) { for (int i = 0; i < members.length; i++) {
currentMember = members[i]; currentMember = members[i];
build(elements); buildChildren(node);
} }
} }
} }
...@@ -507,12 +492,12 @@ public class SerializedFormBuilder extends AbstractBuilder { ...@@ -507,12 +492,12 @@ public class SerializedFormBuilder extends AbstractBuilder {
* Build the summaries for the fields that belong to the given * Build the summaries for the fields that belong to the given
* class. * class.
*/ */
public void buildSerializableFields(List<?> elements) { public void buildSerializableFields(XMLNode node) {
MemberDoc[] members = currentClass.serializableFields(); MemberDoc[] members = currentClass.serializableFields();
if (members.length > 0) { if (members.length > 0) {
for (int i = 0; i < members.length; i++) { for (int i = 0; i < members.length; i++) {
currentMember = members[i]; currentMember = members[i];
build(elements); buildChildren(node);
} }
} }
} }
......
/*
* Copyright (c) 2010, 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 com.sun.tools.doclets.internal.toolkit.builders;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Simple class to represent the attribute and elements of an XML node.
*/
public class XMLNode {
XMLNode(XMLNode parent, String qname) {
this.parent = parent;
name = qname;
attrs = new HashMap<String,String>();
children = new ArrayList<XMLNode>();
if (parent != null)
parent.children.add(this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("<");
sb.append(name);
for (Map.Entry<String,String> e: attrs.entrySet())
sb.append(" " + e.getKey() + "=\"" + e.getValue() + "\"");
if (children.size() == 0)
sb.append("/>");
else {
sb.append(">");
for (XMLNode c: children)
sb.append(c.toString());
sb.append("</" + name + ">");
}
return sb.toString();
}
final XMLNode parent;
final String name;
final Map<String,String> attrs;
final List<XMLNode> children;
}
...@@ -41,7 +41,7 @@ import javax.tools.ToolProvider; ...@@ -41,7 +41,7 @@ import javax.tools.ToolProvider;
* of a <em>project</em>). Simply ensure that this class is added to * of a <em>project</em>). Simply ensure that this class is added to
* the project and make it the main class of the project.</p> * the project and make it the main class of the project.</p>
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p> * or deletion without notice.</b></p>
......
...@@ -36,7 +36,7 @@ import javax.tools.*; ...@@ -36,7 +36,7 @@ import javax.tools.*;
* Java Compiler Server. Can be used to speed up a set of (small) * Java Compiler Server. Can be used to speed up a set of (small)
* compilation tasks by caching jar files between compilations. * compilation tasks by caching jar files between compilations.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p> * or deletion without notice.</b></p>
......
...@@ -33,7 +33,7 @@ import com.sun.tools.javac.api.DiagnosticFormatter.*; ...@@ -33,7 +33,7 @@ import com.sun.tools.javac.api.DiagnosticFormatter.*;
* Provides simple functionalities for javac diagnostic formatting. * Provides simple functionalities for javac diagnostic formatting.
* @param <D> type of diagnostic handled by this formatter * @param <D> type of diagnostic handled by this formatter
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
......
...@@ -31,7 +31,7 @@ import java.util.Locale; ...@@ -31,7 +31,7 @@ import java.util.Locale;
* This interface must be implemented by any javac class that has non-trivial * This interface must be implemented by any javac class that has non-trivial
* formatting needs (e.g. where toString() does not apply because of localization). * formatting needs (e.g. where toString() does not apply because of localization).
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
......
...@@ -38,7 +38,7 @@ import com.sun.tools.javac.comp.Env; ...@@ -38,7 +38,7 @@ import com.sun.tools.javac.comp.Env;
/** /**
* Provides an implementation of Scope. * Provides an implementation of Scope.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p> * or deletion without notice.</b></p>
......
...@@ -54,9 +54,9 @@ import com.sun.tools.javac.util.List; ...@@ -54,9 +54,9 @@ import com.sun.tools.javac.util.List;
import com.sun.tools.javac.main.JavaCompiler; import com.sun.tools.javac.main.JavaCompiler;
/** /**
* Provides access to functionality specific to the Sun Java Compiler, javac. * Provides access to functionality specific to the JDK Java Compiler, javac.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p> * or deletion without notice.</b></p>
...@@ -502,7 +502,7 @@ public class JavacTaskImpl extends JavacTask { ...@@ -502,7 +502,7 @@ public class JavacTaskImpl extends JavacTask {
} }
/** /**
* For internal use by Sun Microsystems only. This method will be * For internal use only. This method will be
* removed without warning. * removed without warning.
*/ */
public Context getContext() { public Context getContext() {
...@@ -510,7 +510,7 @@ public class JavacTaskImpl extends JavacTask { ...@@ -510,7 +510,7 @@ public class JavacTaskImpl extends JavacTask {
} }
/** /**
* For internal use by Sun Microsystems only. This method will be * For internal use only. This method will be
* removed without warning. * removed without warning.
*/ */
public void updateContext(Context newContext) { public void updateContext(Context newContext) {
...@@ -518,7 +518,7 @@ public class JavacTaskImpl extends JavacTask { ...@@ -518,7 +518,7 @@ public class JavacTaskImpl extends JavacTask {
} }
/** /**
* For internal use by Sun Microsystems only. This method will be * For internal use only. This method will be
* removed without warning. * removed without warning.
*/ */
public Type parseType(String expr, TypeElement scope) { public Type parseType(String expr, TypeElement scope) {
......
...@@ -57,7 +57,7 @@ import java.nio.charset.Charset; ...@@ -57,7 +57,7 @@ import java.nio.charset.Charset;
/** /**
* TODO: describe com.sun.tools.javac.api.Tool * TODO: describe com.sun.tools.javac.api.Tool
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p> * or deletion without notice.</b></p>
......
...@@ -71,7 +71,7 @@ import com.sun.tools.javac.util.Pair; ...@@ -71,7 +71,7 @@ import com.sun.tools.javac.util.Pair;
/** /**
* Provides an implementation of Trees. * Provides an implementation of Trees.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p> * or deletion without notice.</b></p>
......
...@@ -32,7 +32,7 @@ import java.util.MissingResourceException; ...@@ -32,7 +32,7 @@ import java.util.MissingResourceException;
* This interface defines the minimum requirements in order to provide support * This interface defines the minimum requirements in order to provide support
* for localized formatted strings. * for localized formatted strings.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
......
...@@ -42,7 +42,7 @@ import javax.tools.*; ...@@ -42,7 +42,7 @@ import javax.tools.*;
* <p>This class might be moved to {@link javax.tools} in a future * <p>This class might be moved to {@link javax.tools} in a future
* release. * release.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own * If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change * risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p> * or deletion without notice.</b></p>
......
...@@ -38,8 +38,8 @@ import static com.sun.tools.javac.code.TypeTags.*; ...@@ -38,8 +38,8 @@ import static com.sun.tools.javac.code.TypeTags.*;
/** An annotation value. /** An annotation value.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -27,7 +27,7 @@ package com.sun.tools.javac.code; ...@@ -27,7 +27,7 @@ package com.sun.tools.javac.code;
/** /**
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
......
...@@ -33,8 +33,8 @@ import javax.lang.model.element.Modifier; ...@@ -33,8 +33,8 @@ import javax.lang.model.element.Modifier;
/** Access flags and other modifiers for Java classes and members. /** Access flags and other modifiers for Java classes and members.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
...@@ -226,7 +226,7 @@ public class Flags { ...@@ -226,7 +226,7 @@ public class Flags {
public static final long HYPOTHETICAL = 1L<<37; public static final long HYPOTHETICAL = 1L<<37;
/** /**
* Flag that marks a Sun proprietary class. * Flag that marks an internal proprietary class.
*/ */
public static final long PROPRIETARY = 1L<<38; public static final long PROPRIETARY = 1L<<38;
......
...@@ -38,8 +38,8 @@ import static com.sun.tools.javac.code.Flags.*; ...@@ -38,8 +38,8 @@ import static com.sun.tools.javac.code.Flags.*;
* different subclasses of Symbol. Symbol kinds are organized so they can be * different subclasses of Symbol. Symbol kinds are organized so they can be
* or'ed to sets. * or'ed to sets.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -39,8 +39,8 @@ import static com.sun.tools.javac.code.Flags.*; ...@@ -39,8 +39,8 @@ import static com.sun.tools.javac.code.Flags.*;
/** /**
* A class for handling -Xlint suboptions and @SuppresssWarnings. * A class for handling -Xlint suboptions and @SuppresssWarnings.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
...@@ -196,14 +196,19 @@ public class Lint ...@@ -196,14 +196,19 @@ public class Lint
RAW("rawtypes"), RAW("rawtypes"),
/** /**
* Warn about Sun proprietary API that may be removed in a future release. * Warn about proprietary API that may be removed in a future release.
*/ */
SUNAPI("sunapi", true), SUNAPI("sunapi", true),
/** /**
* Warn about issues relating to use of statics * Warn about issues relating to use of statics
*/ */
STATIC("static"); STATIC("static"),
/**
* Warn about potentially unsafe vararg methods
*/
VARARGS("varargs");
LintCategory(String option) { LintCategory(String option) {
this(option, false); this(option, false);
......
...@@ -41,7 +41,7 @@ import static com.sun.tools.javac.code.Flags.*; ...@@ -41,7 +41,7 @@ import static com.sun.tools.javac.code.Flags.*;
* A combined type/symbol visitor for generating non-trivial localized string * A combined type/symbol visitor for generating non-trivial localized string
* representation of types and symbols. * representation of types and symbols.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
......
...@@ -34,8 +34,8 @@ import java.util.Iterator; ...@@ -34,8 +34,8 @@ import java.util.Iterator;
* as hash tables. Scopes can be nested; the next field of a scope points * as hash tables. Scopes can be nested; the next field of a scope points
* to its next outer scope. Nested scopes can share their hash tables. * to its next outer scope. Nested scopes can share their hash tables.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -33,8 +33,8 @@ import java.util.*; ...@@ -33,8 +33,8 @@ import java.util.*;
/** The source language version accepted. /** The source language version accepted.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -49,8 +49,8 @@ import static com.sun.tools.javac.code.TypeTags.*; ...@@ -49,8 +49,8 @@ import static com.sun.tools.javac.code.TypeTags.*;
* types, packages. Each subclass is represented as a static inner class * types, packages. Each subclass is represented as a static inner class
* inside Symbol. * inside Symbol.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
...@@ -42,8 +42,8 @@ import static com.sun.tools.javac.code.Flags.*; ...@@ -42,8 +42,8 @@ import static com.sun.tools.javac.code.Flags.*;
* fields. This makes it possible to work in multiple concurrent * fields. This makes it possible to work in multiple concurrent
* projects, which might use different class files for library classes. * projects, which might use different class files for library classes.
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
...@@ -452,7 +452,7 @@ public class Symtab { ...@@ -452,7 +452,7 @@ public class Symtab {
synthesizeBoxTypeIfMissing(floatType); synthesizeBoxTypeIfMissing(floatType);
synthesizeBoxTypeIfMissing(voidType); synthesizeBoxTypeIfMissing(voidType);
// Enter a synthetic class that is used to mark Sun // Enter a synthetic class that is used to mark internal
// proprietary classes in ct.sym. This class does not have a // proprietary classes in ct.sym. This class does not have a
// class file. // class file.
ClassType proprietaryType = (ClassType)enterClass("sun.Proprietary+Annotation"); ClassType proprietaryType = (ClassType)enterClass("sun.Proprietary+Annotation");
......
...@@ -39,8 +39,8 @@ import java.util.Set; ...@@ -39,8 +39,8 @@ import java.util.Set;
* annotation targets a type argument in a local variable, method return type, * annotation targets a type argument in a local variable, method return type,
* or a typecast). * or a typecast).
* *
* <p><b>This is NOT part of any API supported by Sun Microsystems. If * <p><b>This is NOT part of any supported API.
* you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or * This code and its internal interfaces are subject to change or
* deletion without notice.</b> * deletion without notice.</b>
*/ */
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册