code: protected T get(Class<?> type,
  	                Class<? extends T> byDefinition,
  	                InjectionProvider provider,
  	                RoutingContext routeContext,
  	                MediaType[] mediaTypes) throws ClassFactoryException,
  	                                               ContextException {
  
  		Class<? extends T> clazz = byDefinition;
  
  		// No class defined ... try by type
  		if (clazz == null) {
  			clazz = get(type);
  		}
  
  		// try with media type ...
  		if (clazz == null && mediaTypes != null && mediaTypes.length > 0) {
  
  			for (MediaType mediaType : mediaTypes) {
  				clazz = get(mediaType);
  
  				if (clazz != null) {
  					break;
  				}
  			}
  		}
  
  		if (clazz != null) {
  			return getClassInstance(clazz, provider, routeContext);
  		}
  
  		// 3. find cached instance ... if any
  		return cache.get(type.getName());
  	}
docs: TODO : move media type specific into a new class that Reader, Writer factory derives from