Trait

scala.reflect.api

Scopes

Related Doc: package api

Permalink

trait Scopes extends AnyRef

EXPERIMENTAL

This trait provides support for scopes in the reflection API.

A scope object generally maps names to symbols available in a corresponding lexical scope. Scopes can be nested. The base type exposed to the reflection API, however, only exposes a minimal interface, representing a scope as an iterable of symbols.

For rare occasions when it is necessary to create a scope manually, e.g., to populate members of scala.reflect.api.Types#RefinedType, there is the newScopeWith function.

Additional functionality is exposed in member scopes that are returned by members and decls defined in scala.reflect.api.Types#TypeApi. Such scopes support the sorted method, which sorts members in declaration order.

Self Type
Universe
Source
Scopes.scala
Linear Supertypes
Known Subclasses
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Scopes
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Scopes

  1. abstract type MemberScope >: Null <: Universe.MemberScopeApi with Universe.Scope

    Permalink

    The type of member scopes, as in class definitions, for example.

  2. abstract type Scope >: Null <: Universe.ScopeApi

    Permalink

    The base type of all scopes.

API

The methods available for each reflection entity, without the implementation. Since the reflection entities are later overridden by runtime reflection and macros, their API counterparts guarantee a minimum set of methods that are implemented.

  1. trait MemberScopeApi extends Universe.ScopeApi

    Permalink

    The API that all member scopes support

  2. trait ScopeApi extends Iterable[Universe.Symbol]

    Permalink

    The API that all scopes support