Main.java revision 553
45N/A/*
952N/A * Copyright 2009 Google, Inc. All Rights Reserved.
45N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
45N/A *
45N/A * This code is free software; you can redistribute it and/or modify it
45N/A * under the terms of the GNU General Public License version 2 only, as
45N/A * published by the Free Software Foundation.
45N/A *
45N/A * This code is distributed in the hope that it will be useful, but WITHOUT
45N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
45N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
45N/A * version 2 for more details (a copy is included in the LICENSE file that
45N/A * accompanied this code).
45N/A *
45N/A * You should have received a copy of the GNU General Public License version
45N/A * 2 along with this work; if not, write to the Free Software Foundation,
45N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
45N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
45N/A */
45N/A
45N/A/*
45N/A * @test
952N/A * @bug 6709246
45N/A * @summary Class-cast exception when annotation type is missing.
64N/A * @library ../../lib
45N/A */
45N/A
45N/Aimport java.io.IOException;
45N/Aimport com.sun.javadoc.RootDoc;
45N/Aimport com.sun.javadoc.ClassDoc;
45N/Aimport com.sun.javadoc.AnnotationDesc;
45N/A
45N/Apublic class Main extends Tester.Doclet {
45N/A
45N/A private static final Tester tester = new Tester("Main", "somepackage");
45N/A
45N/A public static void main(String... args) throws Exception {
45N/A tester.run();
952N/A }
45N/A
45N/A public static boolean start(RootDoc root) {
45N/A for (ClassDoc d : root.classes()) {
45N/A for (AnnotationDesc a : d.annotations()) {
45N/A System.out.println(a.annotationType());
45N/A }
45N/A }
45N/A return true;
45N/A }
45N/A}
45N/A