/*
* 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.
*/
/*
* @test
* @bug 6380018 6392177 6993311
* @summary Test the ability to create and process package-info.java files
* @author Joseph D. Darcy
* @library ../../lib
* @build JavacTestingAbstractProcessor
* @compile TestPackageInfo.java
* @compile -processor TestPackageInfo -proc:only foo/bar/package-info.java TestPackageInfo.java
*/
/**
* Test the ability to process annotations on package-info.java files:
* 1) Visibility of package-info files from the command line
* 2) Visibility of generated package-info.java source files
*/
round++;
// Verify annotations are as expected
if (!roundEnv.processingOver()) {
}
switch (round) {
case 1:
if (rootElementSize != 2)
// Note that foo.bar.FuBar, an element of package
// foo.bar, contains @Deprecated which should *not* be
// included in the set of annotations to process
}
try {
try {
throw new RuntimeException("Created class file for \"package-info\".");
} catch(FilerException fe) {}
} catch(IOException ioe) {
throw new RuntimeException(ioe);
}
break;
case 2:
// Expect foo.package-info
}
break;
default:
}
}
return false;
}
}