@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AnnotationReference)) return false;
        if (!super.equals(o)) return false;

        AnnotationReference that = (AnnotationReference) o;

        if (reference != null ? !reference.toString().equals(that.reference.toString()) : that.reference != null) {
            return false;
        }

        return true;
    }
WARNING!&nbsp;Only to be used by deserializers when reference is not fully deserialized yet!&nbsp;Sets
an {@link Annotation} that this AnnotationReference shall refer to.

@param reference an Annotation that this AnnotationReference shall refer to.
@throws IllegalArgumentException if the given annotation has a type that is not compatible with this reference
document/src/main/java/com/yahoo/document/annotation/AnnotationReference.java