1060 * Inaccessible members are not added to the last. 1061 */ 1062 public List<MemberName> getNestedTypes(Class<?> defc, boolean searchSupers, 1063 Class<?> lookupClass) { 1064 int matchFlags = IS_TYPE | (searchSupers ? SEARCH_ALL_SUPERS : 0); 1065 return getMembers(defc, null, null, matchFlags, lookupClass); 1066 } 1067 private static MemberName[] newMemberBuffer(int length) { 1068 MemberName[] buf = new MemberName[length]; 1069 // fill the buffer with dummy structs for the JVM to fill in 1070 for (int i = 0; i < length; i++) 1071 buf[i] = new MemberName(); 1072 return buf; 1073 } 1074 } 1075 1076 // static { 1077 // System.out.println("Hello world! My methods are:"); 1078 // System.out.println(Factory.INSTANCE.getMethods(MemberName.class, true, null)); 1079 // } 1080 } | 1060 * Inaccessible members are not added to the last. 1061 */ 1062 public List<MemberName> getNestedTypes(Class<?> defc, boolean searchSupers, 1063 Class<?> lookupClass) { 1064 int matchFlags = IS_TYPE | (searchSupers ? SEARCH_ALL_SUPERS : 0); 1065 return getMembers(defc, null, null, matchFlags, lookupClass); 1066 } 1067 private static MemberName[] newMemberBuffer(int length) { 1068 MemberName[] buf = new MemberName[length]; 1069 // fill the buffer with dummy structs for the JVM to fill in 1070 for (int i = 0; i < length; i++) 1071 buf[i] = new MemberName(); 1072 return buf; 1073 } 1074 } 1075 1076 // static { 1077 // System.out.println("Hello world! My methods are:"); 1078 // System.out.println(Factory.INSTANCE.getMethods(MemberName.class, true, null)); 1079 // } 1080 1081 static { 1082 // Allow privileged classes outside of java.lang 1083 jdk.internal.misc.SharedSecrets.setJavaLangInvokeAccess(new jdk.internal.misc.JavaLangInvokeAccess() { 1084 public Object newMemberName() { 1085 return new MemberName(); 1086 } 1087 }); 1088 } 1089 } |