code: public void precomputeTypeLists(
          CmsObject cms,
          String folderRootPath,
          String checkViewableReferenceUri,
          List<CmsElementView> views,
          I_CmsResourceTypeEnabledCheck check) {
  
          Multimap<CmsUUID, CmsResourceTypeBean> result = ArrayListMultimap.create();
  
          // Sort list to make sure that 'Other types' view is processed last, because we may need to display
          // types filtered / removed from other views, which we only know once we have processed these views
          Collections.sort(views, new Comparator<CmsElementView>() {
  
              public int compare(CmsElementView view0, CmsElementView view1) {
  
                  return ComparisonChain.start().compareFalseFirst(view0.isOther(), view1.isOther()).result();
              }
          });
  
          for (CmsElementView view : views) {
              try {
                  result.putAll(
                      view.getId(),
                      getResourceTypes(cms, folderRootPath, checkViewableReferenceUri, view, check));
              } catch (Exception e) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
          }
          m_cachedTypes = result;
      }
docs: Precomputes type lists for multiple views.<p>
  
  @param cms the CMS context
  @param folderRootPath the current folder
  @param checkViewableReferenceUri the reference uri to use for viewability check
  @param views the views for which to generate the type lists
  @param check object to check whether resource types should be enabled