Contexts
Container for top-level definitions related to contexts.
See Contexts.Context for more details.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Contexts.type
Members list
Type members
Classlikes
A semantic universe for a given Classpaths.Classpath.
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.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any