#/bin/sh

# Finds the names of ListOf element classes mentioned in any of the
# .java files in the specified root directory, including their packages.
# So the output includes names such as ix.icore.domain.Refinement

if [ "$#" -ne 1 ]
then
  echo "usage: gen/find-elt-classes directory"
  exit 1
fi

script_dir=`dirname "$0"`
root=$1

$script_dir/find-listofs $root | \
	grep '^ListOf' | sed 's:^ListOf::' | \
	xargs apply "find $root -name %1.java" | \
	sed "s:^$root/::" | sed 's:.java$::' | tr '/' '.'
