@Test public void testUnionTypes() { assertEquals("v(?=i{?=ff})", new TypeEncoder().encode(toSootClass(Methods.class).getMethodByName("m6"), false)); assertEquals("v(?=i{?=dd})", new TypeEncoder().encode(toSootClass(Methods.class).getMethodByName("m6"), true)); }
public String encode(SootMethod method, boolean is64bit) { StringBuilder sb = new StringBuilder(); sb.append(encodeOne(method, method.getReturnType(), -1, is64bit)); for (int i = 0; i < method.getParameterCount(); i++) { sb.append(encodeOne(method, method.getParameterType(i), i, is64bit)); } return sb.toString(); }
TypeEncoder { public String encode(SootMethod method, boolean is64bit) { StringBuilder sb = new StringBuilder(); sb.append(encodeOne(method, method.getReturnType(), -1, is64bit)); for (int i = 0; i < method.getParameterCount(); i++) { sb.append(encodeOne(method, method.getParameterType(i), i, is64bit)); } return sb.toString(); } }
TypeEncoder { public String encode(SootMethod method, boolean is64bit) { StringBuilder sb = new StringBuilder(); sb.append(encodeOne(method, method.getReturnType(), -1, is64bit)); for (int i = 0; i < method.getParameterCount(); i++) { sb.append(encodeOne(method, method.getParameterType(i), i, is64bit)); } return sb.toString(); }  }
TypeEncoder { public String encode(SootMethod method, boolean is64bit) { StringBuilder sb = new StringBuilder(); sb.append(encodeOne(method, method.getReturnType(), -1, is64bit)); for (int i = 0; i < method.getParameterCount(); i++) { sb.append(encodeOne(method, method.getParameterType(i), i, is64bit)); } return sb.toString(); }  String encode(SootMethod method, boolean is64bit); }
TypeEncoder { public String encode(SootMethod method, boolean is64bit) { StringBuilder sb = new StringBuilder(); sb.append(encodeOne(method, method.getReturnType(), -1, is64bit)); for (int i = 0; i < method.getParameterCount(); i++) { sb.append(encodeOne(method, method.getParameterType(i), i, is64bit)); } return sb.toString(); }  String encode(SootMethod method, boolean is64bit); static final String SELECTOR; static final String OBJC_CLASS; }