MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

reflection/InnerImplementation.java:30–40  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

28
29public class InnerImplementation {
30 public static void
31 main(String[] args) throws Exception {
32 A a = InnerA.makeA();
33 a.f();
34 System.out.println(a.getClass().getName());
35 // Reflection still gets into the private class:
36 HiddenImplementation.callHiddenMethod(a, "g");
37 HiddenImplementation.callHiddenMethod(a, "u");
38 HiddenImplementation.callHiddenMethod(a, "v");
39 HiddenImplementation.callHiddenMethod(a, "w");
40 }
41}
42/* Output:
43public C.f()

Callers

nothing calls this directly

Calls 3

makeAMethod · 0.95
fMethod · 0.95
callHiddenMethodMethod · 0.95

Tested by

no test coverage detected