public int findMethodIndexInVtable(@Nonnull MethodReference method) { return findMethodIndexInVtable(getVtable(), method); }
private void addToVtable(@Nonnull Iterable<? extends Method> localMethods, @Nonnull List<Method> vtable, boolean replaceExisting, boolean sort) { if (sort) { ArrayList<Method> methods = Lists.newArrayList(localMethods); Collections.sort(methods); localMethods = methods; } for (Method virtualMethod: localMethods) { int vtableIndex = findMethodIndexInVtable(vtable, virtualMethod); if (vtableIndex >= 0) { if (replaceExisting) { vtable.set(vtableIndex, virtualMethod); } } else { // we didn't find an equivalent method, so add it as a new entry vtable.add(virtualMethod); } } }
private void addToVtable(@Nonnull Iterable<? extends Method> localMethods, @Nonnull List<Method> vtable, boolean replaceExisting, boolean sort) { if (sort) { ArrayList<Method> methods = Lists.newArrayList(localMethods); Collections.sort(methods); localMethods = methods; } for (Method virtualMethod: localMethods) { int vtableIndex = findMethodIndexInVtable(vtable, virtualMethod); if (vtableIndex >= 0) { if (replaceExisting) { vtable.set(vtableIndex, virtualMethod); } } else { // we didn't find an equivalent method, so add it as a new entry vtable.add(virtualMethod); } } }
public int findMethodIndexInVtable(@Nonnull MethodReference method) { return findMethodIndexInVtable(getVtable(), method); }