Context

final
class Context

A semantic universe for a given Classpaths.Classpath.

A Context gathers all the semantic information about symbols, types and trees that can be found in a given classpath. It represents a "universe" in which all definitions are related to each other.

It is common practice to carry a (using Context) in every method that manipulates a given universe. Virtually all methods of the tasty-query API require a given Context. The current given Context can be accessed with ctx.

The main entry point is the method findSymbolFromRoot, which gives access to a top-level symbol from its fully-qualified name path.

Another likely entry point is to use defn.RootPackage to obtain the root package package symbol, and explore everything from there using Symbols.DeclaringSymbol.getDecl and/or Symbols.DeclaringSymbol.declarations.

The same instance of Classpaths.Classpath can be reused to create several Contexts, if necessary.

class Object
trait Matchable
class Any

Value members

Concrete methods

def findSymbolFromRoot(path: List[Name]): Symbol

Concrete fields