public <T extends Annotation> Optional<T> getAnnotation(final Class<T> clazz) {
            Objects.requireNonNull(clazz);
            return Optional.ofNullable(fieldAnnotationsMap.get(clazz))
                    .or(() -> Optional.ofNullable(getterAnnotationsMap.get(clazz)))
                    .map(clazz::cast);
        }
@return The {@link Annotation} if it is found on the field or getter, in that order.
stroom-util/src/main/java/stroom/util/config/PropertyUtil.java