Examples of loadNewVersion()


Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    ReloadableType targetImplR = subLoader.loadAsReloadableType(targetImpl);
    ReloadableType invokerR = subLoader.loadAsReloadableType(invoker);

    targetR.loadNewVersion("2", retrieveRename(target, target + "002"));
    targetImplR.loadNewVersion("2", retrieveRename(targetImpl, targetImpl + "002", target + "002:" + target));
    invokerR.loadNewVersion("2",
        retrieveRename(invoker, invoker + "003", target + "002:" + target, targetImpl + "002:" + targetImpl));

    // Now call the run() in the Invoker type, which calls 'Target.m()' where Target is in a different loader
    // and has been reloaded
    result = runUnguarded(invokerR.getClazz(), "run");
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    assertStartsWith("catchers.B@", runUnguarded(clazz, "runToString").returnValue);
    Assert.assertEquals(65, runUnguarded(clazz, "runPublicMethod").returnValue);
    Assert.assertEquals(23, runUnguarded(clazz, "runProtectedMethod").returnValue);

    rtypeB.loadNewVersion("2", retrieveRename(b, b + "2"));

    Assert.assertEquals("hey!", runUnguarded(clazz, "runToString").returnValue);
    Assert.assertEquals(66, runUnguarded(clazz, "runPublicMethod").returnValue);
    Assert.assertEquals(32, runUnguarded(clazz, "runProtectedMethod").returnValue);
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    typeRegistry.addType("inners.One$Inner", loadBytesForClass("inners.One$Inner"));
    ReloadableType rtype = typeRegistry.addType("inners.One", loadBytesForClass("inners.One"));
    runUnguarded(rtype.getClazz(), "runner");

    rtype.loadNewVersion("2", retrieveRename("inners.One", "inners.One2", "inners.One2$Inner:inners.One$Inner"));
    runUnguarded(rtype.getClazz(), "runner");
  }

  /**
   * Similar to the first test but this is just using a regular default visibility class.
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    typeRegistry.addType("inners.TwoDefault", loadBytesForClass("inners.TwoDefault"));
    ReloadableType rtype = typeRegistry.addType(tclass, loadBytesForClass(tclass));
    runUnguarded(rtype.getClazz(), "runner");

    rtype.loadNewVersion("2", retrieveRename(tclass, tclass + "2"));
    runUnguarded(rtype.getClazz(), "runner");
  }

  /**
   * Similar to the first test but this is just using a private visibility inner class. Private inner class becomes default
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    runUnguarded(rtype.getClazz(), "runner");

//    ReloadableType rtypeInner =
    typeRegistry.addType("inners.Three$Inner", retrieveRename("inners.Three$Inner", "inners.Three2$Inner","inners.Three2:inners.Three"));

    rtype.loadNewVersion("2", retrieveRename(tclass, tclass + "2", "inners.Three2$Inner:inners.Three$Inner","inners.Three2:inners.Three"));
    runUnguarded(rtype.getClazz(), "runner");
  }

  /**
   * Similar to the first test but this is just using a protected visibility inner class. Protected inner class becomes public
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    TypeRegistry typeRegistry = getTypeRegistry("inners..*");
    typeRegistry.addType("inners.Four$Inner", retrieveRename("inners.Four$Inner", "inners.Four2$Inner","inners.Four2:inners.Four"));
    ReloadableType rtype = typeRegistry.addType(tclass, loadBytesForClass(tclass));
    runUnguarded(rtype.getClazz(), "runner");

    rtype.loadNewVersion("2", retrieveRename(tclass, tclass + "2", "inners.Four2$Inner:inners.Four$Inner","inners.Four2:inners.Four"));
    runUnguarded(rtype.getClazz(), "runner");
  }
}
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    String t = "iri.JLRCGetAnnotations";
    TypeRegistry r = getTypeRegistry(t);
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("1:@reflection.AnnoT()", result.returnValue);
    rtype.loadNewVersion(retrieveRenameRetarget(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("1:@java.lang.Deprecated()", result.returnValue);
  }

  @Test
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    String t = "iri.JLRCGetDecAnnotations";
    TypeRegistry r = getTypeRegistry(t);
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("1:@reflection.AnnoT()", result.returnValue);
    rtype.loadNewVersion(retrieveRenameRetarget(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("1:@java.lang.Deprecated()", result.returnValue);
  }

  @Test
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    String t = "iri.JLRCGetAnnotation";
    TypeRegistry r = getTypeRegistry(t);
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("@reflection.AnnoT() null", result.returnValue);
    rtype.loadNewVersion(retrieveRenameRetarget(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("null @java.lang.Deprecated()", result.returnValue);
  }

  @Test
View Full Code Here

Examples of org.springsource.loaded.ReloadableType.loadNewVersion()

    String t = "iri.JLRCIsAnnotationPresent";
    TypeRegistry r = getTypeRegistry(t);
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("truefalse", result.returnValue);
    rtype.loadNewVersion(retrieveRenameRetarget(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("falsetrue", result.returnValue);
  }

  @Test
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.