code: public List<Association> getAssociationsForTarget(Class<? extends Model> targetModelClass) {
          List<Association> result = new ArrayList<>();
          for (Association association : associations) {
              if (association.getTargetClass().getName().equals(targetModelClass.getName())) {
                  result.add(association);
              }
          }
          return result;
      }
docs: Returns associations of this table with the target table. It is possible
  to have more than one association to a target table if a target table is the same as source. Usually this
  happens when tree structures are stored in the same table (category has many categories).
  
  @param targetModelClass association of this model and the target model.
  @return list of associations of this table with the target table. Will return empty list if none found.
  table and specified type.