Created
May 23, 2019 02:21
-
-
Save nbhusare/c7837b7cf341b582c6d16ba9a78d7878 to your computer and use it in GitHub Desktop.
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
private static ClassLoader getBundleClassLoader(String name) { | |
Bundle bundle = Platform.getBundle(name); | |
BundleWiring wiring = bundle.adapt(BundleWiring.class); | |
wiring != null : String.format("Should not happen; current state of bundle %s is %s", | |
bundle.getSymbolicName(), bundle.getState()); | |
return wiring.getClassLoader(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment