class ProjectionService implements InitializingBean {

    void addProjectionInterface(NamedProjection annotation, Class<?> annotatedInterface) throws MultipleSimilarlyNamedProjectionsException, MultipleDefaultProjectionsException {
        var projectionName = getProjectionName(annotation, annotatedInterface);
        var projectionTarget = annotation.target();
        var defaultProjection = annotation.defaultProjection();
        Pair<String, Class<?>> nameTargetPair = Pair.of(projectionName, projectionTarget);

        if(projectionClassMap.containsKey(nameTargetPair)) {
            throw new MultipleSimilarlyNamedProjectionsException(projectionName, projectionTarget);
        }
        projectionClassMap.put(nameTargetPair, annotatedInterface);

        log.debug(String.format("Added projection for target '%s' with name '%s'!",
                projectionTarget.toString(), projectionName));

        if(defaultProjection) {
            if(defaultProjectionClassMap.containsKey(projectionTarget)) {
                throw new MultipleDefaultProjectionsException(projectionTarget);
            }
            defaultProjectionClassMap.put(projectionTarget, annotatedInterface);

            log.debug(String.format("Added default projection for target '%s' with name '%s'!",
                    projectionTarget.toString(), projectionName));
        }
    }

    @Autowired public  ProjectionService(AnnotatedTypeScanner typeScanner, AnnotationUtilsWrapper annotationUtilsWrapper);

}