!replaceElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValue)) addElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValue); !replaceElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValue)) addElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValue);
/** * Deletes the given elementValue to the target. */ public void deleteElementValue(String elementValueMethodName) { // What's the target? if (targetAnnotation != null) { // Delete the element value to the target annotation. targetAnnotation.u2elementValuesCount = deleteElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValueMethodName); } else { // Delete the element value to the target array element value. targetArrayElementValue.u2elementValuesCount = deleteElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValueMethodName); } }
/** * Creates a new ElementValueAdder that will copy element values into the * given target annotation. */ public ElementValueAdder(ProgramClass targetClass, Annotation targetAnnotation, boolean replaceElementValues) { this.targetClass = targetClass; this.targetAnnotationDefaultAttribute = null; constantAdder = new ConstantAdder(targetClass); elementValuesEditor = new ElementValuesEditor(targetClass, targetAnnotation, replaceElementValues); }
/** * Deletes the element values with the given name from the given array of * element values, returning the new number of element values. */ private int deleteElementValue(int elementValuesCount, ElementValue[] elementValues, String elementValueMethodName) { // Find the element value. int index = findElementValue(elementValuesCount, elementValues, elementValueMethodName); if (index < 0) { return elementValuesCount; } // Shift the other element values in the array. System.arraycopy(elementValues, index + 1, elementValues, index, elementValuesCount - index - 1); // Clear the last entry in the array. elementValues[--elementValuesCount] = null; return elementValuesCount; }
private void addElementValue(ElementValue newElementValue) { // What's the target? if (targetAnnotationDefaultAttribute != null) { // Simply set the completed element value. targetAnnotationDefaultAttribute.defaultValue = newElementValue; } else { // Add it to the target. elementValuesEditor.addElementValue(newElementValue); } } }
/** * Creates a new ElementValueAdder that will copy element values into the * given target element value. */ public ElementValueAdder(ProgramClass targetClass, ArrayElementValue targetArrayElementValue, boolean replaceElementValues) { this.targetClass = targetClass; this.targetAnnotationDefaultAttribute = null; constantAdder = new ConstantAdder(targetClass); elementValuesEditor = new ElementValuesEditor(targetClass, targetArrayElementValue, replaceElementValues); }
/** * Deletes the element values with the given name from the given array of * element values, returning the new number of element values. */ private int deleteElementValue(int elementValuesCount, ElementValue[] elementValues, String elementValueMethodName) { // Find the element value. int index = findElementValue(elementValuesCount, elementValues, elementValueMethodName); if (index < 0) { return elementValuesCount; } // Shift the other element values in the array. System.arraycopy(elementValues, index + 1, elementValues, index, elementValuesCount - index - 1); // Clear the last entry in the array. elementValues[--elementValuesCount] = null; return elementValuesCount; }
private void addElementValue(ElementValue newElementValue) { // What's the target? if (targetAnnotationDefaultAttribute != null) { // Simply set the completed element value. targetAnnotationDefaultAttribute.defaultValue = newElementValue; } else { // Add it to the target. elementValuesEditor.addElementValue(newElementValue); } } }
!replaceElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValue)) addElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValue); !replaceElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValue)) addElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValue);
/** * Creates a new ElementValueAdder that will copy element values into the * given target annotation. */ public ElementValueAdder(ProgramClass targetClass, Annotation targetAnnotation, boolean replaceElementValues) { this.targetClass = targetClass; this.targetAnnotationDefaultAttribute = null; constantAdder = new ConstantAdder(targetClass); elementValuesEditor = new ElementValuesEditor(targetClass, targetAnnotation, replaceElementValues); }
/** * Deletes the element values with the given name from the given array of * element values, returning the new number of element values. */ private int deleteElementValue(int elementValuesCount, ElementValue[] elementValues, String elementValueMethodName) { // Find the element value. int index = findElementValue(elementValuesCount, elementValues, elementValueMethodName); if (index < 0) { return elementValuesCount; } // Shift the other element values in the array. System.arraycopy(elementValues, index + 1, elementValues, index, elementValuesCount - index - 1); // Clear the last entry in the array. elementValues[--elementValuesCount] = null; return elementValuesCount; }
private void addElementValue(ElementValue newElementValue) { // What's the target? if (targetAnnotationDefaultAttribute != null) { // Simply set the completed element value. targetAnnotationDefaultAttribute.defaultValue = newElementValue; } else { // Add it to the target. elementValuesEditor.addElementValue(newElementValue); } } }
/** * Deletes the given elementValue to the target. */ public void deleteElementValue(String elementValueMethodName) { // What's the target? if (targetAnnotation != null) { // Delete the element value to the target annotation. targetAnnotation.u2elementValuesCount = deleteElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValueMethodName); } else { // Delete the element value to the target array element value. targetArrayElementValue.u2elementValuesCount = deleteElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValueMethodName); } }
!replaceElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValue)) addElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValue); !replaceElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValue)) addElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValue);
/** * Creates a new ElementValueAdder that will copy element values into the * given target annotation. */ public ElementValueAdder(ProgramClass targetClass, Annotation targetAnnotation, boolean replaceElementValues) { this.targetClass = targetClass; this.targetAnnotationDefaultAttribute = null; constantAdder = new ConstantAdder(targetClass); elementValuesEditor = new ElementValuesEditor(targetClass, targetAnnotation, replaceElementValues); }
/** * Deletes the element values with the given name from the given array of * element values, returning the new number of element values. */ private int deleteElementValue(int elementValuesCount, ElementValue[] elementValues, String elementValueMethodName) { // Find the element value. int index = findElementValue(elementValuesCount, elementValues, elementValueMethodName); if (index < 0) { return elementValuesCount; } // Shift the other element values in the array. System.arraycopy(elementValues, index + 1, elementValues, index, elementValuesCount - index - 1); // Clear the last entry in the array. elementValues[--elementValuesCount] = null; return elementValuesCount; }
private void addElementValue(ElementValue newElementValue) { // What's the target? if (targetAnnotationDefaultAttribute != null) { // Simply set the completed element value. targetAnnotationDefaultAttribute.defaultValue = newElementValue; } else { // Add it to the target. elementValuesEditor.addElementValue(newElementValue); } } }
/** * Deletes the given elementValue to the target. */ public void deleteElementValue(String elementValueMethodName) { // What's the target? if (targetAnnotation != null) { // Delete the element value to the target annotation. targetAnnotation.u2elementValuesCount = deleteElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValueMethodName); } else { // Delete the element value to the target array element value. targetArrayElementValue.u2elementValuesCount = deleteElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValueMethodName); } }
!replaceElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValue)) addElementValue(targetAnnotation.u2elementValuesCount, targetAnnotation.elementValues, elementValue); !replaceElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValue)) addElementValue(targetArrayElementValue.u2elementValuesCount, targetArrayElementValue.elementValues, elementValue);
/** * Creates a new ElementValueAdder that will copy element values into the * given target element value. */ public ElementValueAdder(ProgramClass targetClass, ArrayElementValue targetArrayElementValue, boolean replaceElementValues) { this.targetClass = targetClass; this.targetAnnotationDefaultAttribute = null; constantAdder = new ConstantAdder(targetClass); elementValuesEditor = new ElementValuesEditor(targetClass, targetArrayElementValue, replaceElementValues); }