diff --git a/overviews/reflection/annotations-names-scopes.md b/overviews/reflection/annotations-names-scopes.md index 007e4d9621..1531ea4a5c 100644 --- a/overviews/reflection/annotations-names-scopes.md +++ b/overviews/reflection/annotations-names-scopes.md @@ -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, @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/overviews/reflection/overview.md b/overviews/reflection/overview.md index f533f45cab..e26b180c9d 100644 --- a/overviews/reflection/overview.md +++ b/overviews/reflection/overview.md @@ -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 @@ -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`.