@Test public void testMethodDescriptionParser() { MethodDescriptor desc1 = MethodDescriptors.fromDesc("([I[[Lfoo/Bar;Z)V", "baz"); MethodDescriptor desc2 = new MethodDescriptorBuilder() .returnType(TypeDescriptors.fromRaw("V")) .parameterTypes( TypeDescriptors.fromRaw("[I"), TypeDescriptors.fromRaw("[[Lfoo/Bar;"), TypeDescriptors.fromRaw("Z") ) .name("baz") .build(); assertEquals("Method descriptors should be identical", desc1, desc2); }
public static MethodDescriptor fromDesc(String desc, String name) { final MethodKey key = new MethodKey(name, desc); return methodDescriptorCache.computeIfAbsent(key, MethodDescriptors::newDescriptor); }
MethodDescriptors { public static MethodDescriptor fromDesc(String desc, String name) { final MethodKey key = new MethodKey(name, desc); return methodDescriptorCache.computeIfAbsent(key, MethodDescriptors::newDescriptor); } }
MethodDescriptors { public static MethodDescriptor fromDesc(String desc, String name) { final MethodKey key = new MethodKey(name, desc); return methodDescriptorCache.computeIfAbsent(key, MethodDescriptors::newDescriptor); } private  MethodDescriptors(); }
MethodDescriptors { public static MethodDescriptor fromDesc(String desc, String name) { final MethodKey key = new MethodKey(name, desc); return methodDescriptorCache.computeIfAbsent(key, MethodDescriptors::newDescriptor); } private  MethodDescriptors(); static MethodDescriptor fromDesc(String desc, String name); }
MethodDescriptors { public static MethodDescriptor fromDesc(String desc, String name) { final MethodKey key = new MethodKey(name, desc); return methodDescriptorCache.computeIfAbsent(key, MethodDescriptors::newDescriptor); } private  MethodDescriptors(); static MethodDescriptor fromDesc(String desc, String name);  }