private static CommandInterfaceInfo forInterfaceUncached(Class<?> iface) { checkNotNull(iface, "iface must not be null"); checkArgument(iface.isInterface(), "iface must be interface"); checkArgument(iface.isAnnotationPresent(HandlesCommandsFor.class), "Interface %s is not annotated with @HandlesCommandsFor", iface); String aggregateType = iface.getAnnotation(HandlesCommandsFor.class).value(); Map<Method, CommandMethodMapping> commandMappers = getCommandMappers(iface, aggregateType); Map<CommandType, CommandTypeInfo> typeInfoMap = commandMappers.values().stream().collect(Collectors.toMap( CommandMethodMapping::getCommandType, CommandMethodMapping::getCommandTypeInfo )); MultiTypeCommandDispatcher commandDispatcher = CommandDispatchers.dispatchingCommandsByType(commandMappers); return new CommandInterfaceInfo(typeInfoMap, commandMappers, CommandTypeMatcher.matchingAgainst(typeInfoMap), commandDispatcher); }