code: Collection<LookupResult> lookupAllModels(Resource resource) {
          if (resource == null) {
              throw new IllegalArgumentException("Method argument resource must not be null.");
          }
  
          final Key key = key(resource, "allModels");
  
          if (isUnmapped(key)) {
              return null;
          }
  
          Collection<LookupResult> sources = lookupFromCache(key);
  
          if (sources == null) {
              final int currentStateId = this.state.get();
              sources = resolveModelSources(resource, null, false);
  
              if (sources.isEmpty()) {
                  markAsUnmapped(key, currentStateId);
              } else {
                  cache(key, sources, currentStateId);
              }
          }
  
          return nullIfEmpty(sources);
      }
docs: Finds the all models for the given {@link Resource}, i.e. the
  all model(s) found when traversing the resource's
  {@link MappableTypeHierarchy mappable hierarchy}.
  
  @param resource must not be <code>null</code>.
  @return the model sources, or <code>null</code> if no models exist for the resource.