Created
October 28, 2017 04:42
-
-
Save kgmyshin/4dfc8f807e6f07fc82082f999afbe348 to your computer and use it in GitHub Desktop.
kotlin系jarをclasspathに含めるかどうかで変わる -> というより gradle plugin実行時のClassLoader.getSystemClassLoaderの振る舞いが変わる?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val classLoader = URLClassLoader( | |
arrayOf(クラスファイル群パス), | |
ClassLoader.getSystemClassLoader() | |
) | |
val clazz = classLoader.loadClass("クラス名") | |
println("clazz.annotations.size: " + clazz.declaredAnnotations.size + " ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment