Package org.springsource.loaded

Examples of org.springsource.loaded.ReloadableType$MergedRewrite$ChainedAdapters


  @Test
  public void reloadProtectedVisInner() throws Exception {
    String tclass = "inners.Four";
    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


  @Test
  public void testJLRCGetAnnotations() throws Exception {
    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);
  }
View Full Code Here

  @Test
  public void testJLRCGetDecAnnotations() throws Exception {
    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);
  }
View Full Code Here

  @Test
  public void testJLRCGetAnnotation() throws Exception {
    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);
  }
View Full Code Here

  @Test
  public void testJLRCIsAnnotationPresent() throws Exception {
    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);
  }
View Full Code Here

  @Test
  public void testJLRCGetParameterAnnotations() throws Exception {
    String t = "iri.JLRCGetParameterAnnotations";
    TypeRegistry r = getTypeRegistry(t);
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("[1:@reflection.AnnoT()][0:][1:@reflection.AnnoT2()]", result.returnValue);
    rtype.loadNewVersion(retrieveRenameRetarget(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("[1:@reflection.AnnoT2()][1:@reflection.AnnoT()][0:]", result.returnValue);
  }
View Full Code Here

  @Test
  public void testJLRCNewInstance() throws Exception {
    String t = "iri.JLRCNewInstance";
    TypeRegistry r = getTypeRegistry(t);
    ReloadableType rtype = r.addType(t, loadBytesForClass(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("instance", result.returnValue);
    rtype.loadNewVersion(retrieveRenameRetarget(t));
    result = runUnguarded(rtype.getClazz(), "run");
    assertEquals("instance", result.returnValue);
  }
View Full Code Here

  @Test
  public void testJLRMGetAnnotations() throws Exception {
    String t = "iri.JLRMGetAnnotations";
    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);
  }
View Full Code Here

  @Test
  public void testJLRMGetDecAnnotations() throws Exception {
    String t = "iri.JLRMGetDecAnnotations";
    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);
  }
View Full Code Here

  @Test
  public void testJLRMGetAnnotation() throws Exception {
    String t = "iri.JLRMGetAnnotation";
    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);
  }
View Full Code Here

TOP

Related Classes of org.springsource.loaded.ReloadableType$MergedRewrite$ChainedAdapters

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.