An implementation of definesClass that will use analysis for an input directory to determine whether it defines a particular class.
An implementation of definesClass that will use analysis for an input directory to determine whether it defines a particular class.
TODO: This optimization is unnecessary for jars on the classpath, which are already indexed. Can remove after the sbt jar output patch lands.
Gets analysis for a classpath entry (if it exists) by translating its path to a potential cache location and then checking the cache.
A facade around the analysis cache to: 1) map between classpath entries and cache locations 2) use analysis for
definesClass
when it is availableSBT uses the
definesClass
andgetAnalysis
methods in order to load the APIs for upstream classes. For a classpath containing multiple entries, sbt will calldefinesClass
sequentially on classpath entries until it finds a classpath entry defining a particular class. When it finds the appropriate classpath entry, it will usegetAnalysis
to fetch the API for that class.