Package org.springsource.loaded

Examples of org.springsource.loaded.TypeRegistry$BsmInfo


  public void basic5() throws Exception {
    binLoader = new TestClassloaderWithRewriting();
    String t = "simple.BasicE";
    String target = "simple.BasicETarget";

    TypeRegistry r = getTypeRegistry(t + "," + target);

    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    ReloadableType rtypeTarget = r.addType(target, loadBytesForClass(target));

    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("hello", result.returnValue);

    rtype.loadNewVersion("2", retrieveRename(t, t + "2"));
View Full Code Here


    String t = "simple.BasicF";
    String target = "simple.BasicFTarget";
    // GlobalConfiguration.logging = true;
    // GlobalConfiguration.isRuntimeLogging = true;

    TypeRegistry r = getTypeRegistry(t + "," + target);

    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    ReloadableType rtypeTarget = r.addType(target, loadBytesForClass(target));

    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("123", result.returnValue);

    // rtype.loadNewVersion("2", retrieveRename(t, t + "2"));
View Full Code Here

  @Test
  public void methodCallTargetComingAndGoing() throws Exception {
    binLoader = new TestClassloaderWithRewriting();
    String t = "simple.BasicG";
    String target = "simple.BasicGTarget";
    TypeRegistry r = getTypeRegistry(t + "," + target);
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    ReloadableType rtypeTarget = r.addType(target, loadBytesForClass(target));

    // At this point BasicG.run() is calling a method that does not yet
    // exist on BasicGTarget
    try {
      result = runUnguarded(rtype.getClazz(), "run");
View Full Code Here

    String t = "simple.Values";
    String target = "simple.BasicFTarget";
    // GlobalConfiguration.logging = true;
    // GlobalConfiguration.isRuntimeLogging = true;

    TypeRegistry r = getTypeRegistry(t + "," + target);

    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    // ReloadableType rtypeTarget = r.addType(target,
    // loadBytesForClass(target));

    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals(new Integer(123), result.returnValue);
View Full Code Here

   */
  @Test
  public void closure1() throws Exception {
    String t = "simple.BasicWithClosure";
    String c = "simple.BasicWithClosure$_run_closure1";
    TypeRegistry r = getTypeRegistry(t + "," + c);
    ReloadableType ctype = r.addType(c, loadBytesForClass(c));

    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("Executing:hello!", result.stdout);

    rtype.loadNewVersion("2",
        retrieveRename(t, t + "2", "simple.BasicWithClosure2$_run_closure1:simple.BasicWithClosure$_run_closure1"));
View Full Code Here

   */
  @Test
  public void closure2() throws Exception {
    String t = "simple.BasicWithClosureB";
    String c = "simple.BasicWithClosureB$_closure1";
    TypeRegistry r = getTypeRegistry(t + "," + c);
    ReloadableType ctype = r.addType(c, loadBytesForClass(c));
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("Executing:hello!", result.stdout);

    rtype.loadNewVersion("2",
        retrieveRename(t, t + "2", "simple.BasicWithClosureB2$_closure1:simple.BasicWithClosureB$_closure1"));
View Full Code Here

  @Test
  public void closure3() throws Exception {
    String t = "simple.BasicWithClosureC";
    String c = "simple.BasicWithClosureC$_run_closure1";
    String c2 = "simple.BasicWithClosureC$_run_closure1_closure2";
    TypeRegistry r = getTypeRegistry(t + "," + c + "," + c2);
    ReloadableType ctype = r.addType(c, loadBytesForClass(c));
    ReloadableType c2type = r.addType(c2, loadBytesForClass(c2));
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("foo() running\nin closure", result.stdout);

    rtype.loadNewVersion(
        "2",
View Full Code Here

  @Test
  public void closure4_oneReference() throws Exception {
    String t = "simple.BasicWithClosureD";
    String c = "simple.BasicWithClosureD$_run_closure1";
    String c2 = "simple.BasicWithClosureD$_run_closure1_closure2";
    TypeRegistry r = getTypeRegistry(t + "," + c + "," + c2);
    ReloadableType ctype = r.addType(c, loadBytesForClass(c));
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("foo() running\nstring is abc\nowner is not null", result.stdout);

    rtype.loadNewVersion(
        "2",
View Full Code Here

   */
  @Test
  public void closure5_multipleReferences() throws Exception {
    String t = "simple.BasicWithClosureE";
    String c = "simple.BasicWithClosureE$_run_closure1";
    TypeRegistry r = getTypeRegistry(t + "," + c);
    ReloadableType ctype = r.addType(c, loadBytesForClass(c));
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("foo() running\nstring is abc\nowner is not null", result.stdout);

    rtype.loadNewVersion(
        "2",
View Full Code Here

   */
  @Test
  public void testControllers1() throws Exception {
    String t = "controller.Controller";
    String closure = "controller.Controller$_closure1";
    TypeRegistry r = getTypeRegistry(t + "," + closure);
    ReloadableType ttype = r.addType(t, loadBytesForClass(t));
    ReloadableType closuretype = r.addType(closure, loadBytesForClass(closure));

    result = runUnguarded(ttype.getClazz(), "execute");
    assertEquals("[action:list, params:2]", result.stdout);

    // Change the body of the 'index' closure
View Full Code Here

TOP

Related Classes of org.springsource.loaded.TypeRegistry$BsmInfo

Copyright © 2018 www.massapicom. 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.