use of org.springsource.loaded.MethodMember in project spring-loaded by spring-projects.
the class IncrementalTypeDescriptorTests method deletedMethods2.
// overridden (caught) method deleted
@Test
public void deletedMethods2() throws Exception {
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());
}
use of org.springsource.loaded.MethodMember in project spring-loaded by spring-projects.
the class SignatureFinder method gatherConstructorSignatures.
private void gatherConstructorSignatures(String typeName, String version, Set<String> sigs) {
TypeRegistry tr = getTypeRegistry("");
byte[] bytes = null;
if (version.equals("")) {
bytes = loadBytesForClass(typeName);
} else {
bytes = retrieveRename(typeName, typeName + version);
}
TypeDescriptor typeDescriptor = new TypeDescriptorExtractor(tr).extract(bytes, true);
for (MethodMember method : typeDescriptor.getConstructors()) {
sigs.add(method.getDescriptor());
}
}
Aggregations