1package test.java.lang.invoke.AccessControlTest_subpkg; 2import test.java.lang.invoke.AccessControlTest; 3import java.lang.invoke.*; 4import static java.lang.invoke.MethodHandles.*; 5 6// This guy tests access from outside the package test.java.lang.invoke: 7public class Acquaintance_remote { 8 public static Lookup[] lookups() { 9 return new Lookup[] { 10 Acquaintance_remote.lookup_in_remote(), 11 Remote_subclass.lookup_in_subclass(), 12 Remote_hidden.lookup_in_hidden() 13 }; 14 } 15 16 public static Lookup lookup_in_remote() { 17 return MethodHandles.lookup(); 18 } 19 public static void pub_in_remote() { } 20 protected static void pro_in_remote() { } 21 static /*package*/ void pkg_in_remote() { } 22 private static void pri_in_remote() { } 23 24 public static class Remote_subclass extends AccessControlTest { 25 static Lookup lookup_in_subclass() { 26 return MethodHandles.lookup(); 27 } 28 public static void pub_in_subclass() { } 29 protected static void pro_in_subclass() { } 30 static /*package*/ void pkg_in_subclass() { } 31 private static void pri_in_subclass() { } 32 } 33 static /*package*/ class Remote_hidden { 34 static Lookup lookup_in_hidden() { 35 return MethodHandles.lookup(); 36 } 37 public static void pub_in_hidden() { } 38 protected static void pro_in_hidden() { } 39 static /*package*/ void pkg_in_hidden() { } 40 private static void pri_in_hidden() { } 41 } 42} 43