code: private Type getAppropriateType(Class<?> type, Type genericType)
      {    
          return type.equals(genericType) ? type : genericType;
      }
docs: Returns the type of the given class.
  @param type The class to get the type for
  @param genericType The type to use if the input class is a generic type
  @return The type of the given class