code: public static boolean isJoinTable(final Table table) {
          if (table.getPrimaryKey() == null) {
              return false;
          }
          final boolean hasMultipartFK = (table.getPrimaryKey().getColumns().size() > 1);
          for (final Column column : table.getColumns()) {
              if (hasMultipartFK) {
                  // has to be both
                  if (!(column.isPartOfForeignKey() && column.isPartOfPrimaryKey())) {
                      return false;
                  }
              } else {
                  // If there is a single column that is not part of a foreign key and not the primary key, it needs a separate class
                  if (!column.isPartOfForeignKey() && !column.isPartOfPrimaryKey()) {
                      return false;
                  }
              }
          }
          return true;
      }
docs: Uses heuristics to determine whether a table is a join table.
  <p>
  A table is identified as a join table if every column is part of a foreign key or part of the primary key. Furthermore the primary may only consist of
  a single column or every column has to be part of a foreign key.
  
  @param table The table to check
  @return {@code true} if the table is probably a join table, false otherwise