private A getAnnotation(Set<? extends Element> elements) {
        return elements.stream()
                .findFirst()
                .map(element -> element.getAnnotation(getAnnotationClass()))
                .orElseThrow(() -> new IllegalStateException("No annotation of type "
                        + getAnnotationClass() + " found on element."));
    }
Maps annotation data to a plugin configuration node.

@param annotation instance of generator annotation to use to create the build config.
@return ObjectNode to use as plugin configuration node.
smithy-build/src/main/java/software/amazon/smithy/build/processor/SmithyAnnotationProcessor.java