// Path: src/main/java/org/baswell/routes/MIMETypes.java
// public class MIMETypes
// {
//   /**
//    * application/atomcat+xml
//    */
//   static public final String ATOM = "application/atomcat+xml";
// 
//   /**
//    * text/csv
//    */
//   static public final String CSV = "text/csv";
// 
//   /**
//    * application/vnd.ms-excel
//    */
//   static public final String EXCEL = "application/vnd.ms-excel";
// 
//   /**
//    * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
//    */
//   static public final String EXCEL2 = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
// 
//   /**
//    * application/msexcel
//    */
//   static public final String EXCEL3 = "application/msexcel";
// 
//   /**
//    * application/xls
//    */
//   static public final String EXCEL4 = "application/xls";
// 
//   /**
//    * application/x-xls
//    */
//   static public final String EXCEL5 = "application/x-xls";
// 
//   /**
//    * application/x-ms-excel
//    */
//   static public final String EXCEL6 = "application/x-ms-excel";
// 
//   /**
//    * application/x-excel
//    */
//   static public final String EXCEL7 = "application/x-excel";
// 
//   /**
//    * text/html
//    */
//   static public final String HTML = "text/html";
// 
//   /**
//    * application/xhtml+xml
//    */
//   static public final String HTML2 = "application/xhtml+xml";
// 
//   /**
//    * text/calendar
//    */
//   static public final String ICS = "text/calendar";
// 
//   /**
//    * application/javascript
//    */
//   static public final String JAVASCRIPT = "application/javascript";
// 
//   /**
//    * application/x-javascript
//    */
//   static public final String JAVASCRIPT2 = "application/x-javascript";
// 
//   /**
//    * text/javascript
//    */
//   static public final String JAVASCRIPT3 = "text/javascript";
// 
//   /**
//    * application/json
//    */
//   static public final String JSON = "application/json";
// 
//   /**
//    * text/x-json
//    */
//   static public final String JSON2 = "text/x-json";
// 
//   /**
//    * application/pdf
//    */
//   static public final String PDF = "application/pdf";
// 
//   /**
//    * application/rss+xml
//    */
//   static public final String RSS = "application/rss+xml";
// 
//   /**
//    * text/plain
//    */
//   static public final String TEXT = "text/plain";
// 
//   /**
//    * application/msword
//    */
//   static public final String WORD = "application/msword";
// 
//   /**
//    * application/vnd.openxmlformats-officedocument.wordprocessingml.document
//    */
//   static public final String WORD2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
// 
//   /**
//    * application/xml
//    */
//   static public final String XML = "application/xml";
// 
//   /**
//    * text/xml
//    */
//   static public final String XML2 = "text/xml";
// }
// 
// Path: src/main/java/org/baswell/routes/RoutesMethods.java
// static boolean classImplementsInterface(Class clazz, Class interfaze)
// {
//   if ((clazz == null) || (clazz == Object.class))
//   {
//     return false;
//   }
// 
//   Class[] implementedInterfaces = clazz.getInterfaces();
//   for (Class implementedInterface : implementedInterfaces)
//   {
//     if (classInstanceOf(implementedInterface, interfaze))
//     {
//       return true;
//     }
//   }
// 
//   return classImplementsInterface(clazz.getSuperclass(), interfaze);
// }


import javax.xml.bind.annotation.XmlRootElement;
import static org.baswell.routes.MIMETypes.*;
import static org.baswell.routes.RoutesMethods.classImplementsInterface;
    String returnTypePackage = conversionType.getPackage().getName();

    if (returnTypePackage.equals("org.json.simple"))
    {
      return ContentConversionType.JSON_SIMPLE;
    }
    else if (returnTypePackage.startsWith("org.w3c.dom"))
    {
      return ContentConversionType.W3C_NODE;
    }
    else if (returnClassName.equals("org.jdom2.Document"))
    {
      return ContentConversionType.JDOM2_DOCUMENT;
    }
    else if (returnClassName.equals("org.jdom2.Element"))
    {
      return ContentConversionType.JDOM2_ELEMENT;
    }
    else if (conversionType.getAnnotation(XmlRootElement.class) != null)
    {
      return ContentConversionType.JAXB;
    }
    else if ((((mediaType != null) && (mediaType == MediaType.JSON))) && availableLibraries.jacksonAvailable())
    {
      return ContentConversionType.JACKSON;
    }
    else if ((((mediaType != null) && (mediaType == MediaType.JSON))) && availableLibraries.gsonAvailable())
    {
      return ContentConversionType.GSON;
    }
// Path: src/main/java/org/baswell/routes/MIMETypes.java
// public class MIMETypes
// {
//   /**
//    * application/atomcat+xml
//    */
//   static public final String ATOM = "application/atomcat+xml";
// 
//   /**
//    * text/csv
//    */
//   static public final String CSV = "text/csv";
// 
//   /**
//    * application/vnd.ms-excel
//    */
//   static public final String EXCEL = "application/vnd.ms-excel";
// 
//   /**
//    * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
//    */
//   static public final String EXCEL2 = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
// 
//   /**
//    * application/msexcel
//    */
//   static public final String EXCEL3 = "application/msexcel";
// 
//   /**
//    * application/xls
//    */
//   static public final String EXCEL4 = "application/xls";
// 
//   /**
//    * application/x-xls
//    */
//   static public final String EXCEL5 = "application/x-xls";
// 
//   /**
//    * application/x-ms-excel
//    */
//   static public final String EXCEL6 = "application/x-ms-excel";
// 
//   /**
//    * application/x-excel
//    */
//   static public final String EXCEL7 = "application/x-excel";
// 
//   /**
//    * text/html
//    */
//   static public final String HTML = "text/html";
// 
//   /**
//    * application/xhtml+xml
//    */
//   static public final String HTML2 = "application/xhtml+xml";
// 
//   /**
//    * text/calendar
//    */
//   static public final String ICS = "text/calendar";
// 
//   /**
//    * application/javascript
//    */
//   static public final String JAVASCRIPT = "application/javascript";
// 
//   /**
//    * application/x-javascript
//    */
//   static public final String JAVASCRIPT2 = "application/x-javascript";
// 
//   /**
//    * text/javascript
//    */
//   static public final String JAVASCRIPT3 = "text/javascript";
// 
//   /**
//    * application/json
//    */
//   static public final String JSON = "application/json";
// 
//   /**
//    * text/x-json
//    */
//   static public final String JSON2 = "text/x-json";
// 
//   /**
//    * application/pdf
//    */
//   static public final String PDF = "application/pdf";
// 
//   /**
//    * application/rss+xml
//    */
//   static public final String RSS = "application/rss+xml";
// 
//   /**
//    * text/plain
//    */
//   static public final String TEXT = "text/plain";
// 
//   /**
//    * application/msword
//    */
//   static public final String WORD = "application/msword";
// 
//   /**
//    * application/vnd.openxmlformats-officedocument.wordprocessingml.document
//    */
//   static public final String WORD2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
// 
//   /**
//    * application/xml
//    */
//   static public final String XML = "application/xml";
// 
//   /**
//    * text/xml
//    */
//   static public final String XML2 = "text/xml";
// }
// 
// Path: src/main/java/org/baswell/routes/RoutesMethods.java
// static boolean classImplementsInterface(Class clazz, Class interfaze)
// {
//   if ((clazz == null) || (clazz == Object.class))
//   {
//     return false;
//   }
// 
//   Class[] implementedInterfaces = clazz.getInterfaces();
//   for (Class implementedInterface : implementedInterfaces)
//   {
//     if (classInstanceOf(implementedInterface, interfaze))
//     {
//       return true;
//     }
//   }
// 
//   return classImplementsInterface(clazz.getSuperclass(), interfaze);
// }


// Path: src/main/java/org/baswell/routes/ContentConversionType.java
import javax.xml.bind.annotation.XmlRootElement;
import static org.baswell.routes.MIMETypes.*;
import static org.baswell.routes.RoutesMethods.classImplementsInterface;

    String returnTypePackage = conversionType.getPackage().getName();

    if (returnTypePackage.equals("org.json.simple"))
    {
      return ContentConversionType.JSON_SIMPLE;
    }
    else if (returnTypePackage.startsWith("org.w3c.dom"))
    {
      return ContentConversionType.W3C_NODE;
    }
    else if (returnClassName.equals("org.jdom2.Document"))
    {
      return ContentConversionType.JDOM2_DOCUMENT;
    }
    else if (returnClassName.equals("org.jdom2.Element"))
    {
      return ContentConversionType.JDOM2_ELEMENT;
    }
    else if (conversionType.getAnnotation(XmlRootElement.class) != null)
    {
      return ContentConversionType.JAXB;
    }
    else if ((((mediaType != null) && (mediaType == MediaType.JSON))) && availableLibraries.jacksonAvailable())
    {
      return ContentConversionType.JACKSON;
    }
    else if ((((mediaType != null) && (mediaType == MediaType.JSON))) && availableLibraries.gsonAvailable())
    {
      return ContentConversionType.GSON;
    }
    else if (classImplementsInterface(conversionType, CharSequence.class))