/** * Instance of category, or null if not available. * * @param category The category to look for. Usually an interface class (not the actual * implementation class). * @return instance, or null of not available * @since 19 */ public <T> T getFactoryByClass(Class<T> category) { return registry.getInstanceOfType(category).orElse(null); }