code: private static boolean classExists(TypeDef typeDef) {
         try {
          Class.forName(typeDef.getFullyQualifiedName());
          return true;
         } catch (ClassNotFoundException e) {
             return false;
         }
      }
docs: Checks if class already exists.
  @param typeDef   The type definition to check if exists.
  @return  True if class can be found, false otherwise.