ExerciseDependency.java revision 553
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews/*
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This code is free software; you can redistribute it and/or modify it
4a73cf8ee07ae396be20231ac252a24830f3c801Bob Halley * under the terms of the GNU General Public License version 2 only, as
70e5a7403f0e0a3bd292b8287c5fed5772c15270Automatic Updater * published by the Free Software Foundation.
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence *
e88eae12e7ee878bb7aa8239240a77789bced612William King * This code is distributed in the hope that it will be useful, but WITHOUT
e88eae12e7ee878bb7aa8239240a77789bced612William King * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e88eae12e7ee878bb7aa8239240a77789bced612William King * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e88eae12e7ee878bb7aa8239240a77789bced612William King * version 2 for more details (a copy is included in the LICENSE file that
e88eae12e7ee878bb7aa8239240a77789bced612William King * accompanied this code).
e88eae12e7ee878bb7aa8239240a77789bced612William King *
e88eae12e7ee878bb7aa8239240a77789bced612William King * You should have received a copy of the GNU General Public License version
e88eae12e7ee878bb7aa8239240a77789bced612William King * 2 along with this work; if not, write to the Free Software Foundation,
e88eae12e7ee878bb7aa8239240a77789bced612William King * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King *
e88eae12e7ee878bb7aa8239240a77789bced612William King * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e88eae12e7ee878bb7aa8239240a77789bced612William King * or visit www.oracle.com if you need additional information or have any
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King * questions.
e88eae12e7ee878bb7aa8239240a77789bced612William King */
e88eae12e7ee878bb7aa8239240a77789bced612William King
e88eae12e7ee878bb7aa8239240a77789bced612William King/**
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Class to exercise dependencies on the two source files generated by
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King * T6634138.java, foo.WrittenAfterProcessing.java and
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King * foo.package-info.java.
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King */
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam Kingpublic class ExerciseDependency {
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King public static void main(String... args) {
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King foo.WrittenAfterProcessing wap = new foo.WrittenAfterProcessing();
e88eae12e7ee878bb7aa8239240a77789bced612William King java.lang.Package pkg = wap.getClass().getPackage();
e88eae12e7ee878bb7aa8239240a77789bced612William King Deprecated d = pkg.getAnnotation(Deprecated.class);
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King if (d == null)
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King throw new RuntimeException();
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King }
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King}
3dda1bbfecc6ca2ea907669be329f61eb3b29e9eWilliam King