@Override public String getKey(Method mtd) { return mtd.getName(); } });
public InvokeExpr(VT type, Value[] args, String ownerType, String methodName, String[] argmentTypes, String returnType) { super(type, args); this.method = new Method(ownerType, methodName, argmentTypes, returnType); }
public MethodWriter(ClassDataItem.EncodedMethod encodedMethod, Method m, boolean isStatic, ConstPool cp) { this.encodedMethod = encodedMethod; this.parameterSize = m.getParameterTypes().length; this.cp = cp; this.method = m; this.isStatic = isStatic; }
public String getOwner() { return method.getOwner(); }
public String getRet() { return method.getReturnType(); }
private static void order(Map<Integer, DexLabel> labelsMap, int offset) { if (!labelsMap.containsKey(offset)) { labelsMap.put(offset, new DexLabel(offset)); } }
/** * @return the parameterTypes */ public String[] getParameterTypes() { return proto.getParameterTypes(); }
public String getReturnType() { return proto.getReturnType(); }
@Override public String getKey(Method mtd) { return mtd.getDesc(); } });
@Override public Proto getProto() { return method.getProto(); } }
public Method(String owner, String name, String[] parameterTypes, String returnType) { this.owner = owner; this.name = name; this.proto = new Proto(parameterTypes, returnType); } public Method(String owner, String name, Proto proto) {
public String getDesc() { return proto.getDesc(); }
@Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (owner != null ? owner.hashCode() : 0); result = 31 * result + proto.hashCode(); return result; }
public String[] getArgs() { return method.getParameterTypes(); }
private Method build(MtdInfo mapTo) { Type[] ts = Type.getArgumentTypes(mapTo.desc); String ss[] = new String[ts.length]; for (int i = 0; i < ss.length; i++) { ss[i] = ts[i].getDescriptor(); } return new Method(mapTo.owner, mapTo.name, ss, Type.getReturnType(mapTo.desc).getDescriptor()); }
public String getName() { return method.getName(); }
@Override public Proto getProto() { return method.getProto(); }
static int countArgs(Method t) { int i = 0; for (String arg : t.getParameterTypes()) { char type = arg.charAt(0); if (type == 'J' || type == 'D') { i += 2; } else { i += 1; } } return i; }