/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* 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.
*/
/*
* A utility used to invoke and test the javadoc tool.
*
* @author Scott Seligman
*/
public class Tester {
".");
"-sourcepath", TEST_SRC,
};
// private final File bootstrapMarkerFile = new File("bootstrap");
// True if we should "set expectations" by writing the expected output file
// rather than reading it and comparing.
// private final boolean bootstrap = bootstrapMarkerFile.isFile();
/*
* Individual tests can extend this to create generics-aware doclets.
*/
return LanguageVersion.JAVA_1_5;
}
}
}
this.docletName = docletName;
try {
} catch (IOException e) {
}
}
try {
getClass().getClassLoader(),
args) != 0) {
throw new Error("Javadoc errors encountered.");
}
} finally {
}
}
/*
* Compare output of test run to expected output.
* Throw an Error if they don't match.
*/
return; // EOF with all lines matching
}
": output doesn't match");
}
}
}
prln(0, o);
}
prln();
}
prPackage(0, p);
}
if (cd.isAnnotationType())
else
}
}
prField(0, f);
}
prParameter(0, p);
}
prMethod(0, m);
}
throws IOException {
prMethod(0, e);
}
prExecutable(0, c);
}
}
+ " " + cd);
m.name() + m.flatSignature());
}
throws IOException {
? ""
: " default " + e.defaultValue();
e.flatSignature() + def);
}
}
}
}
prExecutable(off, m);
}
throws IOException {
if (!m.isAnnotationTypeElement()) {
}
for (Type t : m.typeParameters())
}
throws IOException {
for (AnnotationDesc a : as)
}
}
}
return (t instanceof ClassDoc || t instanceof TypeVariable)
? t.typeName()
: t.toString();
}
// Labels queued for possible printing. Innermost is first in list.
// Print label if its section is nonempty.
}
// Print queued labels with offsets less than "off".
}
}
// Print "o" at given offset.
for (int i = 0; i < off; i++)
if (o != null)
}
// Print "o" (if non-null) at given offset, then newline.
if (o != null) {
prln();
}
}
// Print newline.
}
static class Line {
int off;
Object o;
}
}