From 42331d742d896f1d55bd150618e370618076d52c Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 10 Sep 2015 14:56:01 +0200 Subject: [PATCH 1/2] Hack to get the bytecode of a runtime class from Java 9's module system --- .../de/thetaphi/forbiddenapis/Checker.java | 94 ++++++++++++++----- 1 file changed, 69 insertions(+), 25 deletions(-) diff --git a/src/main/java/de/thetaphi/forbiddenapis/Checker.java b/src/main/java/de/thetaphi/forbiddenapis/Checker.java index 0f84cc6d..bcdf2644 100644 --- a/src/main/java/de/thetaphi/forbiddenapis/Checker.java +++ b/src/main/java/de/thetaphi/forbiddenapis/Checker.java @@ -75,6 +75,7 @@ public static enum Option { final Set bootClassPathJars; final Set bootClassPathDirs; final ClassLoader loader; + final java.lang.reflect.Method method_Class_getModule, method_Module_getResourceAsStream; final EnumSet