private <T> void addType(Class<?> clazz, Map<String, TypeCreator<T>> implementations, DynamicCdiTag tag, TypeCreator<T> typeCreator) { String tagValue = tag != null ? tag.value() : "-"; logger.debug("Found implementation: {} (tag={})", typeCreator.toString(), tagValue); if (implementations.containsKey(tagValue)) { throw new JuRuntimeException(String.format( "Found two Simulatable implementations for %s and tag=%s: %s and %s (more might exist)", clazz.getName(), tagValue, implementations.get(tagValue).toString(), typeCreator.toString())); } else { implementations.put(tagValue, typeCreator); } }
private <T> void addType(Class<?> clazz, Map<String, TypeCreator<T>> implementations, DynamicCdiTag tag, TypeCreator<T> typeCreator) { String tagValue = tag != null ? tag.value() : "-"; logger.debug("Found implementation: {} (tag={})", typeCreator.toString(), tagValue); if (implementations.containsKey(tagValue)) { throw new JuRuntimeException(String.format( "Found two Simulatable implementations for %s and tag=%s: %s and %s (more might exist)", clazz.getName(), tagValue, implementations.get(tagValue).toString(), typeCreator.toString())); } else { implementations.put(tagValue, typeCreator); } }