Package org.springsource.loaded

Examples of org.springsource.loaded.IncrementalTypeDescriptor


    TypeDescriptor typeDescriptor = new TypeDescriptorExtractor(registry).extract(bytes, true);

    byte[] bytes2 = ClassRenamer.rename("data.SimpleClass", loadBytesForClass("data.SimpleClass002"));
    TypeDescriptor typeDescriptor2 = new TypeDescriptorExtractor(registry).extract(bytes2, true);

    IncrementalTypeDescriptor itd = new IncrementalTypeDescriptor(typeDescriptor);
    itd.setLatestTypeDescriptor(typeDescriptor2);

    List<MethodMember> newMethods = itd.getNewOrChangedMethods();
    Assert.assertEquals(1, newMethods.size());
    Assert.assertEquals("0x1 bar()Ljava/lang/String;", newMethods.get(0).toString());

    List<MethodMember> deletedMethods = itd.getDeletedMethods();
    Assert.assertEquals(1, deletedMethods.size());
    Assert.assertEquals("0x1 foo()V", deletedMethods.get(0).toString());
  }
View Full Code Here


    TypeRegistry registry = getTypeRegistry("");
    byte[] bytes = loadBytesForClass("typedescriptor.A");
    TypeDescriptor typeDescriptor = new TypeDescriptorExtractor(registry).extract(bytes, true);
    byte[] bytes2 = ClassRenamer.rename("typedescriptor.A", loadBytesForClass("typedescriptor.A2"));
    TypeDescriptor typeDescriptor2 = new TypeDescriptorExtractor(registry).extract(bytes2, true);
    IncrementalTypeDescriptor itd = new IncrementalTypeDescriptor(typeDescriptor);
    itd.setLatestTypeDescriptor(typeDescriptor2);
    Assert.assertEquals(1, itd.getDeletedMethods().size());
    Assert.assertEquals("0x1 m()V", itd.getDeletedMethods().get(0).toString());
  }
View Full Code Here

    TypeRegistry registry = getTypeRegistry("");
    byte[] bytes = loadBytesForClass("typedescriptor.B");
    TypeDescriptor typeDescriptor = registry.getExtractor().extract(bytes, true);
    byte[] bytes2 = ClassRenamer.rename("typedescriptor.B", loadBytesForClass("typedescriptor.B2"));
    TypeDescriptor typeDescriptor2 = registry.getExtractor().extract(bytes2, true);
    IncrementalTypeDescriptor itd = new IncrementalTypeDescriptor(typeDescriptor);
    itd.setLatestTypeDescriptor(typeDescriptor2);
    List<MethodMember> deleted = itd.getDeletedMethods();
    System.out.println(deleted);
    Assert.assertEquals(1, deleted.size());
    Assert.assertEquals("0x1 m()V", deleted.get(0).toString());
  }
View Full Code Here

    TypeRegistry registry = getTypeRegistry("");
    byte[] bytes = loadBytesForClass("typedescriptor.C");
    TypeDescriptor typeDescriptor = registry.getExtractor().extract(bytes, true);
    byte[] bytes2 = ClassRenamer.rename("typedescriptor.C", loadBytesForClass("typedescriptor.C2"));
    TypeDescriptor typeDescriptor2 = registry.getExtractor().extract(bytes2, true);
    IncrementalTypeDescriptor itd = new IncrementalTypeDescriptor(typeDescriptor);
    itd.setLatestTypeDescriptor(typeDescriptor2);
    System.out.println(itd.toString(true));
    List<MethodMember> changed = itd.getNewOrChangedMethods();
    MethodMember m = getMethod(changed, "staticMethod");
    Assert.assertTrue(IncrementalTypeDescriptor.isNowNonStatic(m));
    m = getMethod(changed, "instanceMethod");
    Assert.assertTrue(IncrementalTypeDescriptor.isNowStatic(m));
    m = getMethod(changed, "publicMethod1");
View Full Code Here

TOP

Related Classes of org.springsource.loaded.IncrementalTypeDescriptor

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.