/** * Removes the given method. Note that removing a method that is still being * referenced can cause unpredictable effects. */ public void removeMethod(Method method) { int methodsCount = targetClass.u2methodsCount; Method[] methods = targetClass.methods; int methodIndex = findMethodIndex(method); // Shift the method entries. System.arraycopy(methods, methodIndex+1, methods, methodIndex, methodsCount - methodIndex - 1); // Clear the last entry. methods[--targetClass.u2methodsCount] = null; }
/** * Removes the given method. Note that removing a method that is still being * referenced can cause unpredictable effects. */ public void removeMethod(Method method) { int methodsCount = targetClass.u2methodsCount; Method[] methods = targetClass.methods; int methodIndex = findMethodIndex(method); // Shift the method entries. System.arraycopy(methods, methodIndex+1, methods, methodIndex, methodsCount - methodIndex - 1); // Clear the last entry. methods[--targetClass.u2methodsCount] = null; }
/** * Removes the given method. Note that removing a method that is still being * referenced can cause unpredictable effects. */ public void removeMethod(Method method) { int methodsCount = targetClass.u2methodsCount; Method[] methods = targetClass.methods; int methodIndex = findMethodIndex(method); // Shift the method entries. System.arraycopy(methods, methodIndex+1, methods, methodIndex, methodsCount - methodIndex - 1); // Clear the last entry. methods[--targetClass.u2methodsCount] = null; }
/** * Removes the given method. Note that removing a method that is still being * referenced can cause unpredictable effects. */ public void removeMethod(Method method) { int methodsCount = targetClass.u2methodsCount; Method[] methods = targetClass.methods; int methodIndex = findMethodIndex(method); // Shift the method entries. System.arraycopy(methods, methodIndex+1, methods, methodIndex, methodsCount - methodIndex - 1); // Clear the last entry. methods[--targetClass.u2methodsCount] = null; }