/** * Removes the given field. Note that removing a field that is still being * referenced can cause unpredictable effects. */ public void removeField(Field field) { int fieldsCount = targetClass.u2fieldsCount; Field[] fields = targetClass.fields; int fieldIndex = findFieldIndex(field); // Shift the field entries. System.arraycopy(fields, fieldIndex+1, fields, fieldIndex, fieldsCount - fieldIndex - 1); // Clear the last entry. fields[--targetClass.u2fieldsCount] = null; }
/** * Removes the given field. Note that removing a field that is still being * referenced can cause unpredictable effects. */ public void removeField(Field field) { int fieldsCount = targetClass.u2fieldsCount; Field[] fields = targetClass.fields; int fieldIndex = findFieldIndex(field); // Shift the field entries. System.arraycopy(fields, fieldIndex+1, fields, fieldIndex, fieldsCount - fieldIndex - 1); // Clear the last entry. fields[--targetClass.u2fieldsCount] = null; }
/** * Removes the given field. Note that removing a field that is still being * referenced can cause unpredictable effects. */ public void removeField(Field field) { int fieldsCount = targetClass.u2fieldsCount; Field[] fields = targetClass.fields; int fieldIndex = findFieldIndex(field); // Shift the field entries. System.arraycopy(fields, fieldIndex+1, fields, fieldIndex, fieldsCount - fieldIndex - 1); // Clear the last entry. fields[--targetClass.u2fieldsCount] = null; }
/** * Removes the given field. Note that removing a field that is still being * referenced can cause unpredictable effects. */ public void removeField(Field field) { int fieldsCount = targetClass.u2fieldsCount; Field[] fields = targetClass.fields; int fieldIndex = findFieldIndex(field); // Shift the field entries. System.arraycopy(fields, fieldIndex+1, fields, fieldIndex, fieldsCount - fieldIndex - 1); // Clear the last entry. fields[--targetClass.u2fieldsCount] = null; }