code: public static TypeCategory getCategory(TypeRepository typeRepository, String typeName) {
          try {
              Class<?> type = typeRepository.loadClass(typeName);
              if (type.isInterface()) {
                  return TypeCategory.INTERFACE;
              } else if (type.isEnum()) {
                  return TypeCategory.ENUM;
              } else {
                  if (Modifier.isAbstract(type.getModifiers())) {
                      return TypeCategory.ABSTRACT_CLASS;
                  } else{
                      return TypeCategory.CLASS;
                  }
              }
          } catch (ClassNotFoundException e) {
              log.warn("Category for type " + typeName + " could not be found.");
              return null;
          }
      }
docs: Finds the category of a given type.
  
  @param typeRepository the repository where types should be loaded from
  @param typeName       the fully qualified type name
  @return               a TypeCategory object representing the category (e.g. class, interface, enum, etc)