Contexts

tastyquery.Contexts
object Contexts

Container for top-level definitions related to contexts.

See Contexts.Context for more details.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Contexts.type

Members list

Type members

Classlikes

final class Context

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 Object
trait Matchable
class Any
object Context

Factory methods for Context.

Factory methods for Context.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Context.type

Value members

Concrete methods

inline def ctx(using ctx: Context): Context

The implicitly available context.

The implicitly available context.

Attributes

inline def defn(using ctx: Context): ctx.defn.type

Standard definitions of symbols and types.

Standard definitions of symbols and types.

Attributes