Class MediaTypeMap<T>

java.lang.Object
org.jboss.resteasy.core.MediaTypeMap<T>

public class MediaTypeMap<T> extends Object
efficient MediaType index of T
Version:
$Revision: 1 $
  • Field Details

  • Constructor Details

    • MediaTypeMap

      public MediaTypeMap()
  • Method Details

    • clone

      public MediaTypeMap<T> clone()
      Overrides:
      clone in class Object
    • getClassCache

      public Map<MediaTypeMap.CachedMediaTypeAndClass,List<T>> getClassCache()
    • add

      public void add(javax.ws.rs.core.MediaType type, T obj)
      Add an object to the media type map. This is synchronized to serialize adds.
      Parameters:
      type -
      obj -
    • convert

      private static <T> List<T> convert(List<MediaTypeMap.Entry<T>> list)
    • getPossible

      public List<T> getPossible(javax.ws.rs.core.MediaType accept)
      Returns a list of objects sorted based on their media type where the first in the list is the best match
      Parameters:
      accept - mime to match
      Returns:
    • getPossible

      public List<T> getPossible(javax.ws.rs.core.MediaType accept, Class<?> type)