Package honeycrm.server.test.small.dyn.hotreload

Examples of honeycrm.server.test.small.dyn.hotreload.InterceptClassLoader.loadClass()


      ResourceStore r = new ResourceStore(db, "Classes");
      r.put(store.getBytecodeMapFromJarInputStream(new FileInputStream(FILE)));
     
      InterceptClassLoader loader = new InterceptClassLoader(getClass().getClassLoader(), Pattern.compile(PATTERN), Arrays.asList(new DatastoreClassLoaderDelegate(r)));
     
      Class c = loader.loadClass("honeycrm.server.test.small.DynamicallyLoadedClass", true);
      //assertTrue(c.newInstance() instanceof Plugin);
      // Plugin p = (Plugin) c.newInstance();
      // assertEquals("42", p.request());
      assertEquals("42", c.getMethod("request").invoke(c.newInstance()));
    } catch (Exception e) {
View Full Code Here


      ResourceStore r = new ResourceStore(db, "Classes");
      InterceptClassLoader loader = new InterceptClassLoader(getClass().getClassLoader(), Pattern.compile(PATTERN), Arrays.asList(new DatastoreClassLoaderDelegate(r)));
     
      r.put(store.getBytecodeMapFromJarInputStream(new FileInputStream(FILE2)));
     
      Class c = loader.loadClass("honeycrm.server.test.small.DynamicallyLoadedClass");
      // assertTrue(c.getInterfaces()[0].equals(Plugin.class));
      // Plugin p = (Plugin) c.newInstance();
      // assertEquals("42", p.request());
      assertEquals("42", c.getMethod("request").invoke(c.newInstance()));
     
View Full Code Here

      // assertTrue(c.getInterfaces()[0].equals(Plugin.class));
      // Plugin p = (Plugin) c.newInstance();
      // assertEquals("42", p.request());
      assertEquals("42", c.getMethod("request").invoke(c.newInstance()));
     
      Class c2 = loader.loadClass("honeycrm.server.test.small.DynamicallyLoadedClassTwo");
      // assertTrue(c2.getInterfaces()[0].equals(Plugin.class));
      // Plugin p2 = (Plugin) c2.newInstance();
      // assertEquals("23", p2.request());
      assertEquals("23", c2.getMethod("request").invoke(c2.newInstance()));
    } catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.