Skip to content

Fix scaladoc links in reflection overview #498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions overviews/reflection/annotations-names-scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ represent different kinds of Java annotation arguments:
## Names

Names are simple wrappers for strings.
[Name](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Names$NameApi)
[Name](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Names$NameApi)
has two subtypes `TermName` and `TypeName` which distinguish names of terms (like
objects or members) and types (like classes, traits, and type members). A term
and a type of the same name can co-exist in the same object. In other words,
Expand Down Expand Up @@ -108,19 +108,19 @@ There are both
Some names, such as "package", exist both as a type name and a term name.
Standard names are made available through the `nme` and `tpnme` members of
class `Universe`. For a complete specification of all standard names, see the
[API documentation](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.StandardNames).
[API documentation](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.StandardNames).

## Scopes

A scope object generally maps names to symbols available in a corresponding
lexical scope. Scopes can be nested. The base type exposed in the reflection
API, however, only exposes a minimal interface, representing a scope as an
iterable of [Symbol](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Symbols$Symbol)s.
iterable of [Symbol](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Symbols$Symbol)s.

Additional functionality is exposed in *member scopes* that are returned by
`members` and `declarations` defined in
[scala.reflect.api.Types#TypeApi](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Types$TypeApi).
[scala.reflect.api.Scopes#MemberScope](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Scopes$MemberScope)
[scala.reflect.api.Types#TypeApi](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Types$TypeApi).
[scala.reflect.api.Scopes#MemberScope](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Scopes$MemberScope)
supports the `sorted` method, which sorts members *in declaration order*.

The following example returns a list of the symbols of all overridden members
Expand All @@ -133,7 +133,7 @@ of the `List` class, in declaration order:

In addition to type `scala.reflect.api.Trees#Tree`, the base type of abstract
syntax trees, typed trees can also be represented as instances of type
[`scala.reflect.api.Exprs#Expr`](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Exprs$Expr).
[`scala.reflect.api.Exprs#Expr`](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Exprs$Expr).
An `Expr` wraps
an abstract syntax tree and an internal type tag to provide access to the type
of the tree. `Expr`s are mainly used to simply and conveniently create typed
Expand Down Expand Up @@ -193,9 +193,9 @@ expressions are compile-time constants (see [section 6.24 of the Scala language

2. String literals - represented as instances of the string.

3. References to classes, typically constructed with [scala.Predef#classOf](http://www.scala-lang.org/api/current/index.html#scala.Predef$@classOf[T]:Class[T]) - represented as [types](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Types$Type).
3. References to classes, typically constructed with [scala.Predef#classOf](http://www.scala-lang.org/api/current/index.html#scala.Predef$@classOf[T]:Class[T]) - represented as [types](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Types$Type).

4. References to Java enumeration values - represented as [symbols](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Symbols$Symbol).
4. References to Java enumeration values - represented as [symbols](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Symbols$Symbol).

Constant expressions are used to represent

Expand Down Expand Up @@ -290,8 +290,8 @@ Example:
## Printers

Utilities for nicely printing
[`Trees`](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Trees) and
[`Types`](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Types).
[`Trees`](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Trees) and
[`Types`](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Types).

### Printing Trees

Expand Down Expand Up @@ -411,7 +411,7 @@ additionally shows the unique identifiers of symbols, as well as their kind
## Positions

Positions (instances of the
[Position](http://www.scala-lang.org/api/current/index.html#scala.reflect.api.Position) trait)
[Position](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Position) trait)
are used to track the origin of symbols and tree nodes. They are commonly used when
displaying warnings and errors, to indicate the incorrect point in the
program. Positions indicate a column and line in a source file (the offset
Expand Down
4 changes: 2 additions & 2 deletions overviews/reflection/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ reflection, such as `Types`, `Trees`, and `Annotations`. For more details, see
the section of this guide on
[Universes]({{ site.baseurl}}/overviews/reflection/environment-universes-mirrors.html),
or the
[Universes API docs](http://www.scala-lang.org/api/{{ site.scala-version}}/scala/reflect/api/Universe.html)
[Universes API docs](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Universe)
in package `scala.reflect.api`.

To use most aspects of Scala reflection, including most code examples provided
Expand All @@ -342,5 +342,5 @@ different flavors of mirrors must be used.
For more details, see the section of this guide on
[Mirrors]({{ site.baseurl}}/overviews/reflection/environment-universes-mirrors.html),
or the
[Mirrors API docs](http://www.scala-lang.org/api/{{ site.scala-version}}/scala/reflect/api/Mirrors.html)
[Mirrors API docs](http://www.scala-lang.org/api/current/scala-reflect/index.html#scala.reflect.api.Mirrors)
in package `scala.reflect.api`.