final boolean debug = LOGGER.isLoggable(DEBUG_LEVEL); if (debug) { debug("ENTRY", category, key, null, null); if (!category.isAssignableFrom(valueClass)) { if (debug) { debug("THROW", category, key, "unexpected type:", valueClass); if (hint != null) { if (debug) { debug("CHECK", category, key, "user provided a", hint.getClass()); debug("RETURN", category, key, "return hint as provided.", null); final Class<?> type = types[i]; if (debug) { debug("CHECK", category, key, "consider hint[" + i + ']', type); if (candidate.isPresent()) { if (debug) { debug( "RETURN", category, debug("CHECK", category, key, "consider hint[last]", implementation); if (candidate.isPresent()) { if (debug) { debug("RETURN", category, key, "found implementation", candidate.getClass());