MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / ensureMemberAccess

Method ensureMemberAccess

unused/sun/reflect/Reflection.java:46–64  ·  view source on GitHub ↗
(Class currentClass,
                                            Class memberClass,
                                            Object target,
                                            int modifiers)

Source from the content-addressed store, hash-verified

44 }
45
46 public static void ensureMemberAccess(Class currentClass,
47 Class memberClass,
48 Object target,
49 int modifiers)
50 throws IllegalAccessException
51 {
52 if (currentClass == null || memberClass == null) {
53 throw new InternalError();
54 }
55
56 if (!verifyMemberAccess(currentClass, memberClass, target, modifiers)) {
57 throw new IllegalAccessException("Class " + currentClass.getName() +
58 " can not access a member of class " +
59 memberClass.getName() +
60 " with modifiers \"" +
61 Modifier.toString(modifiers) +
62 "\"");
63 }
64 }
65
66 public static boolean verifyMemberAccess(Class currentClass,
67 // Declaring class of field

Callers

nothing calls this directly

Calls 3

verifyMemberAccessMethod · 0.95
getNameMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected