/** * Construct a new mock annotation instance. The passed values list will be defensively copied. * * @param name the name of the annotation instance * @param target the thing the annotation is declared on * @param values the values of this annotation instance * @return the new mock Annotation Instance */ public static final AnnotationInstance create(DotName name, AnnotationTarget target, List<AnnotationValue> values) { if (name == null) throw new IllegalArgumentException("Name can't be null"); if (values == null) throw new IllegalArgumentException("Values can't be null"); return create(name, target, values.toArray(ANNOTATION_VALUES_TYPE)); }
static AnnotationInstance create(DotName name, AnnotationTarget target, AnnotationValue[] values) { if ( values == null || values.length == 0 ) { values = EMPTY_ANNOTATION_VALUE_ARRAY; } return AnnotationInstance.create( name, target, addMockMark( values ) ); }
static AnnotationInstance create(DotName name, AnnotationTarget target, AnnotationValue[] values) { if ( values == null || values.length == 0 ) { values = EMPTY_ANNOTATION_VALUE_ARRAY; } return AnnotationInstance.create( name, target, addMockMark( values ) ); }