1 package annotations; 2 3 /*>>> 4 import org.checkerframework.checker.nullness.qual.*; 5 */ 6 7 /** 8 * Builds an array that will serve as a field of an annotation; created by 9 * {@link AnnotationBuilder#beginArrayField}. 10 */ 11 public interface ArrayBuilder { 12 /** 13 * Appends a value to the array. Call this method for each desired array 14 * element, in order. See the rules for values on 15 * {@link Annotation#getFieldValue}; furthermore, a subannotation must have 16 * been created by the same factory as the annotation of which it is a 17 * field. 18 */ appendElement(Object x)19 void appendElement(Object x); 20 21 /** 22 * Finishes building the array. Call this method after all elements have 23 * been appended. 24 */ finish()25 void finish(); 26 } 27