Scan the classpath within subpackages of packageToSearch
to find Scala objects that
contain extend OBJ
and contain method called methodName
that should return an A
.
Scan the classpath within subpackages of packageToSearch
to find Scala objects that
contain extend OBJ
and contain method called methodName
that should return an A
.
Call the method and get the result. If the result is indeed an A
, add to it to
the resulting sequence.
This function makes some assumptions. It assumes that Scala objects have classes ending with '$'. It also assumes that methods in objects have static forwarders.
the super type of the objects the search should find
the output type of elements that should be returned by the method named
methodName
the name of a method in an object that should be found and called.
the package to search for candidates
a sequence of A
instances that could be found.
Created by ryan.deak on 9/6/17.