Skip to content

Commit a778ca7

Browse files
authored
Fix 404s (#2937)
1 parent 218f611 commit a778ca7

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

_ja/overviews/reflection/annotations-names-scopes.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Scala または Java アノテーションに対しては `scalaArgs` は空で
5353
## 名前
5454

5555
**名前** (name) は文字列の簡単なラッパーだ。
56-
[`Name`](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Names$NameApi.html)
56+
[`Name`](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Names$NameApi.html)
5757
には 2つのサブタイプ `TermName``TypeName` があり (オブジェクトやメンバーのような) 項の名前と
5858
(クラス、トレイト、型メンバのような) 型の名前を区別する。同じオブジェクト内に同名の項と型が共存することができる。別の言い方をすると、型と項は別の名前空間を持つ。
5959

@@ -96,19 +96,19 @@ Scala のプログラムにおいて、「`_root_`」のような特定の名前
9696

9797
`package`」のようないくつかの名前は型名と項名の両方が存在する。
9898
標準名は `Universe` クラスの `termNames``typeNames` というメンバとして公開されている。
99-
全ての標準名の仕様は [API doc](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/StandardNames.html) を参照。
99+
全ての標準名の仕様は [API doc](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/StandardNames.html) を参照。
100100

101101
## スコープ
102102

103103
**スコープ** (scope) は一般にある構文スコープ内の名前をシンボルに関連付ける。
104104
スコープは入れ子にすることもできる。リフレクション API
105-
で公開されているスコープの基底型は [Symbol](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Symbols$Symbol.html) の iterable という最小限のインターフェイスのみを公開する。
105+
で公開されているスコープの基底型は [Symbol](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Symbols$Symbol.html) の iterable という最小限のインターフェイスのみを公開する。
106106

107107
追加機能は
108-
[scala.reflect.api.Types#TypeApi](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Types$TypeApi.html)
108+
[scala.reflect.api.Types#TypeApi](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Types$TypeApi.html)
109109
内で定義されている `member``decls`
110110
が返す**メンバスコープ** (member scope) にて公開される。
111-
[scala.reflect.api.Scopes#MemberScope](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Scopes$MemberScope.html)
111+
[scala.reflect.api.Scopes#MemberScope](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Scopes$MemberScope.html)
112112
`sorted` メソッドをサポートしており、これはメンバを**宣言順に**ソートする。
113113

114114
以下に `List` クラスでオーバーライドされている全てのシンボルのリストを宣言順に返す具体例をみてみよう:
@@ -119,7 +119,7 @@ Scala のプログラムにおいて、「`_root_`」のような特定の名前
119119
## Expr
120120

121121
構文木の基底型である `scala.reflect.api.Trees#Tree` の他に、型付けされた構文木は
122-
[`scala.reflect.api.Exprs#Expr`](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Exprs$Expr.html) 型によっても表すことができる。
122+
[`scala.reflect.api.Exprs#Expr`](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Exprs$Expr.html) 型によっても表すことができる。
123123
`Expr` は構文木と、その構文木の型に対するアクセスを提供するための型タグをラッピングする。
124124
`Expr` は主にマクロのために便宜的に型付けられた構文木を作るために使われる。多くの場合、これは
125125
`reify``splice` メソッドが関わってくる。
@@ -175,8 +175,8 @@ Scala コンパイラによってコンパイル時に評価することがで
175175

176176
1. プリミティブ値クラスのリテラル ([Byte](https://www.scala-lang.org/api/current/index.html#scala.Byte)[Short](https://www.scala-lang.org/api/current/index.html#scala.Short)[Int](https://www.scala-lang.org/api/current/index.html#scala.Int)[Long](https://www.scala-lang.org/api/current/index.html#scala.Long)[Float](https://www.scala-lang.org/api/current/index.html#scala.Float)[Double](https://www.scala-lang.org/api/current/index.html#scala.Double)[Char](https://www.scala-lang.org/api/current/index.html#scala.Char)[Boolean](https://www.scala-lang.org/api/current/index.html#scala.Boolean) および [Unit](https://www.scala-lang.org/api/current/index.html#scala.Unit))。これは直接対応する型で表される。
177177
2. 文字列リテラル。これは文字列のインスタンスとして表される。
178-
3. 一般に [scala.Predef#classOf](https://www.scala-lang.org/api/current/index.html#scala.Predef$@classOf[T]:Class[T]) で構築されるクラスへの参照。[](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Types$Type.html)として表される。
179-
4. Java の列挙要素。[シンボル](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Symbols$Symbol.html)として表される。
178+
3. 一般に [scala.Predef#classOf](https://www.scala-lang.org/api/current/index.html#scala.Predef$@classOf[T]:Class[T]) で構築されるクラスへの参照。[](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Types$Type.html)として表される。
179+
4. Java の列挙要素。[シンボル](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Symbols$Symbol.html)として表される。
180180

181181
定数式の用例としては
182182

@@ -264,8 +264,8 @@ Java の列挙要素への参照はシンボル (`scala.reflect.api.Symbols#Symb
264264

265265
## プリティプリンタ
266266

267-
[`Trees`](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Trees.html)
268-
[`Types`](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Types.html)
267+
[`Trees`](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Trees.html)
268+
[`Types`](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Types.html)
269269
を整形して表示するユーティリティを説明しよう。
270270

271271
### 構文木の表示
@@ -380,7 +380,7 @@ Java の列挙要素への参照はシンボル (`scala.reflect.api.Symbols#Symb
380380

381381
## 位置情報
382382

383-
**位置情報** ([`Position`](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Position.html))
383+
**位置情報** ([`Position`](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Position.html))
384384
はシンボルや構文木のノードの出処を追跡するのに使われる。警告やエラーの表示でよく使われ、プログラムのどこが間違ったのかを正確に表示することができる。位置情報はソースファイルの列と行を表す。
385385
(ソースファイルの初めからのオフセットは「ポイント」と呼ばれるが、これは便利ではないことがある)
386386
位置情報はそれが指す行の内容も保持する。全ての構文木やシンボルが位置情報を持つわけではなく、ない場合は

_ja/overviews/reflection/symbols-trees-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ title: シンボル、構文木、型
167167
scala> val intTpe = universe.definitions.IntTpe
168168
intTpe: scala.reflect.runtime.universe.Type = Int
169169

170-
標準型のリストは [`scala.reflect.api.StandardDefinitions`](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/StandardDefinitions$StandardTypes.html) 内の `StandardTypes`
170+
標準型のリストは [`scala.reflect.api.StandardDefinitions`](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/StandardDefinitions$StandardTypes.html) 内の `StandardTypes`
171171
トレイトにて定義されている。
172172

173173
### 型の一般的な演算

_overviews/reflection/annotations-names-scopes.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ represent different kinds of Java annotation arguments:
5858
## Names
5959

6060
Names are simple wrappers for strings.
61-
[Name](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Names$NameApi.html)
61+
[Name](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Names$NameApi.html)
6262
has two subtypes `TermName` and `TypeName` which distinguish names of terms (like
6363
objects or members) and types (like classes, traits, and type members). A term
6464
and a type of the same name can co-exist in the same object. In other words,
@@ -104,19 +104,19 @@ There are both
104104
Some names, such as "package", exist both as a type name and a term name.
105105
Standard names are made available through the `termNames` and `typeNames` members of
106106
class `Universe`. For a complete specification of all standard names, see the
107-
[API documentation](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/StandardNames.html).
107+
[API documentation](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/StandardNames.html).
108108

109109
## Scopes
110110

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

116116
Additional functionality is exposed in *member scopes* that are returned by
117117
`members` and `decls` defined in
118-
[scala.reflect.api.Types#TypeApi](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Types$TypeApi.html).
119-
[scala.reflect.api.Scopes#MemberScope](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Scopes$MemberScope.html)
118+
[scala.reflect.api.Types#TypeApi](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Types$TypeApi.html).
119+
[scala.reflect.api.Scopes#MemberScope](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Scopes$MemberScope.html)
120120
supports the `sorted` method, which sorts members *in declaration order*.
121121

122122
The following example returns a list of the symbols of all final members
@@ -129,7 +129,7 @@ of the `List` class, in declaration order:
129129

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

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

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

194-
4. References to Java enumeration values - represented as [symbols](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Symbols$Symbol.html).
194+
4. References to Java enumeration values - represented as [symbols](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Symbols$Symbol.html).
195195

196196
Constant expressions are used to represent
197197

@@ -287,8 +287,8 @@ Example:
287287
## Printers
288288

289289
Utilities for nicely printing
290-
[`Trees`](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Trees.html) and
291-
[`Types`](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Types.html).
290+
[`Trees`](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Trees.html) and
291+
[`Types`](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Types.html).
292292

293293
### Printing Trees
294294

@@ -408,7 +408,7 @@ additionally shows the unique identifiers of symbols, as well as their kind
408408
## Positions
409409

410410
Positions (instances of the
411-
[Position](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Position.html) trait)
411+
[Position](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Position.html) trait)
412412
are used to track the origin of symbols and tree nodes. They are commonly used when
413413
displaying warnings and errors, to indicate the incorrect point in the
414414
program. Positions indicate a column and line in a source file (the offset

_overviews/reflection/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ reflection, such as `Types`, `Trees`, and `Annotations`. For more details, see
325325
the section of this guide on
326326
[Universes]({{ site.baseurl}}/overviews/reflection/environment-universes-mirrors.html),
327327
or the
328-
[Universes API docs](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Universe.html)
328+
[Universes API docs](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Universe.html)
329329
in package `scala.reflect.api`.
330330

331331
To use most aspects of Scala reflection, including most code examples provided
@@ -345,5 +345,5 @@ different flavors of mirrors must be used.
345345
For more details, see the section of this guide on
346346
[Mirrors]({{ site.baseurl}}/overviews/reflection/environment-universes-mirrors.html),
347347
or the
348-
[Mirrors API docs](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Mirrors.html)
348+
[Mirrors API docs](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Mirrors.html)
349349
in package `scala.reflect.api`.

_sips/sips/scala-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Last section of this proposal is the list of options that each sub-command MUST
132132

133133

134134

135-
Scala CLI can also be configured with ["using directives"](https://scala-cli.virtuslab.org/docs/guides/using-directives) - a comment-based configuration syntax that should be placed at the top of Scala files. This allows for self-containing examples within one file since most of the configuration can be provided either from the command line or via using directives (command line has precedence). This is a game changer for use cases like scripting, reproduction, or within the academic scope.
135+
Scala CLI can also be configured with ["using directives"](https://scala-cli.virtuslab.org/docs/guides/introduction/using-directives/) - a comment-based configuration syntax that should be placed at the top of Scala files. This allows for self-containing examples within one file since most of the configuration can be provided either from the command line or via using directives (command line has precedence). This is a game changer for use cases like scripting, reproduction, or within the academic scope.
136136

137137
We have described the motivation, syntax and implementation basis in the [dedicated pre-SIP](https://contributors.scala-lang.org/t/pre-sip-using-directives/5700). Currently, we recommend to write using directives as comments, so making them part of the language specification is not necessary at this stage. Moreover, the new `scala` command could ignore using directives in the initial version, however we strongly suggest to include comment-based using directives from the start.
138138

@@ -149,7 +149,7 @@ Adopting Scala CLI as the new `scala` command, as is, will change some of the be
149149

150150
### Other concerns
151151

152-
Scala CLI brings [using directives](https://scala-cli.virtuslab.org/docs/guides/using-directives) and [conventions to mark the test files](https://scala-cli.virtuslab.org/docs/commands/test#test-sources). We suggest to accept both accepted as a part of this SIP but we are ready to open dedicated SIPs for both (we have opened a [pre-SIP for using directives](https://contributors.scala-lang.org/t/pre-sip-using-directives/5700/15))
152+
Scala CLI brings [using directives](https://scala-cli.virtuslab.org/docs/guides/introduction/using-directives/) and [conventions to mark the test files](https://scala-cli.virtuslab.org/docs/commands/test#test-sources). We suggest to accept both accepted as a part of this SIP but we are ready to open dedicated SIPs for both (we have opened a [pre-SIP for using directives](https://contributors.scala-lang.org/t/pre-sip-using-directives/5700/15))
153153

154154
Scala CLI is an ambitious project and may seem hard to maintain in the long-run.
155155

_zh-cn/overviews/reflection/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Scala反射实现了允许在编译阶段就对程序进行修改的一种元编
279279
`Universe`是Scala反射的切入点。
280280

281281
`universe`提供了使用反射所关联的很多核心概念,比如`Types``Trees`,以及`Annotations`
282-
更多细节请参阅指南中[Universes](https://docs.scala-lang.org/overviews/reflection/environment-universes-mirrors.html)部分,或者看`scala.reflect.api`包的[Universes API文档](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Universe.html)
282+
更多细节请参阅指南中[Universes](https://docs.scala-lang.org/overviews/reflection/environment-universes-mirrors.html)部分,或者看`scala.reflect.api`包的[Universes API文档](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Universe.html)
283283

284284
本指南中提供了大多数情况下Scala反射要用到的部分,一般在使用运行时反射的场景下,直接导入所有`universe`成员去用即可:
285285

@@ -293,4 +293,4 @@ import scala.reflect.runtime.universe._
293293
反射所能提供的信息都是通过镜像去访问的。
294294
根据不同的类型信息或不同的反射操作,必须要使用不同类型的镜像。
295295

296-
更多细节请参阅指南中[Mirros](https://docs.scala-lang.org/overviews/reflection/environment-universes-mirrors.html)部分,或者看`scala.reflect.api`包的[Mirrors API文档](https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Mirrors.html)
296+
更多细节请参阅指南中[Mirros](https://docs.scala-lang.org/overviews/reflection/environment-universes-mirrors.html)部分,或者看`scala.reflect.api`包的[Mirrors API文档](https://www.scala-lang.org/api/2.x/scala-reflect/scala/reflect/api/Mirrors.html)

0 commit comments

Comments
 (0)