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

Method main

enums/Reflection.java:29–42  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

27 return methods;
28 }
29 public static void main(String[] args) {
30 Set<String> exploreMethods =
31 analyze(Explore.class);
32 Set<String> enumMethods = analyze(Enum.class);
33 System.out.println(
34 "Explore.containsAll(Enum)? " +
35 exploreMethods.containsAll(enumMethods));
36 System.out.print("Explore.removeAll(Enum): ");
37 exploreMethods.removeAll(enumMethods);
38 System.out.println(exploreMethods);
39 // Decompile the code for the enum:
40 OSExecute.command(
41 "javap -cp build/classes/java/main Explore");
42 }
43}
44/* Output:
45_____ Analyzing class Explore _____

Callers

nothing calls this directly

Calls 3

analyzeMethod · 0.95
commandMethod · 0.95
printMethod · 0.80

Tested by

no test coverage detected