MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getClassLoader

Method getClassLoader

ij/src/main/java/ij/IJ.java:2535–2557  ·  view source on GitHub ↗

Returns the class loader ImageJ uses to run plugins or the system class loader if Menus.getPlugInsPath() returns null.

()

Source from the content-addressed store, hash-verified

2533 /** Returns the class loader ImageJ uses to run plugins or the
2534 system class loader if Menus.getPlugInsPath() returns null. */
2535 public static ClassLoader getClassLoader() {
2536 if (classLoader==null) {
2537 String pluginsDir = Menus.getPlugInsPath();
2538 if (pluginsDir==null) {
2539 String home = System.getProperty("plugins.dir");
2540 if (home!=null) {
2541 if (!home.endsWith(Prefs.separator)) home+=Prefs.separator;
2542 pluginsDir = home+"plugins"+Prefs.separator;
2543 if (!(new File(pluginsDir)).isDirectory())
2544 pluginsDir = home;
2545 }
2546 }
2547 if (pluginsDir==null)
2548 return IJ.class.getClassLoader();
2549 else {
2550 if (Menus.jnlp)
2551 classLoader = new PluginClassLoader(pluginsDir, true);
2552 else
2553 classLoader = new PluginClassLoader(pluginsDir);
2554 }
2555 }
2556 return classLoader;
2557 }
2558
2559 /** Returns the size, in pixels, of the primary display. */
2560 public static Dimension getScreenSize() {

Callers 15

runUserPlugInMethod · 0.95
callMethod · 0.95
getExifDataMethod · 0.95
checkForUpdateMethod · 0.95
runCompiledPluginMethod · 0.95
mergeFitsHeadersMethod · 0.95
runMethod · 0.95
isInstanceMethod · 0.95
createImageIconMethod · 0.95
createImageMethod · 0.95

Calls 2

getPlugInsPathMethod · 0.95
getPropertyMethod · 0.45

Tested by 1