You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PR328.java 585B

123456789101112131415161718
  1. import java.lang.reflect.*;
  2. public class PR328 {
  3. public static void main(String[] args) {
  4. new PR328().realMain(args);
  5. }
  6. public void realMain(String[] args) {
  7. try {
  8. Class modest = Class.forName("Modest");
  9. int modifiers = modest.getModifiers();
  10. boolean isPublic = (modifiers & Modifier.PUBLIC) != 0;
  11. org.aspectj.testing.Tester.check(!isPublic, "Modest shouldn't be public");
  12. } catch (Throwable t) {
  13. org.aspectj.testing.Tester.check(false, "Thrown: " + t);
  14. }
  15. }
  16. }
  17. class Modest {}