File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
library/src/scala/annotation/meta Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Scala (https://www.scala-lang.org)
3+ *
4+ * Copyright EPFL and Lightbend, Inc. dba Akka
5+ *
6+ * Licensed under Apache License 2.0
7+ * (http://www.apache.org/licenses/LICENSE-2.0).
8+ *
9+ * See the NOTICE file distributed with this work for
10+ * additional information regarding copyright ownership.
11+ */
12+
13+ package scala .annotation
14+ package meta
15+
16+ /**
17+ * This internal meta annotation is used by the compiler to support default annotation arguments.
18+ *
19+ * For an annotation definition `class ann(x: Int = defaultExpr) extends Annotation`, the compiler adds
20+ * `@defaultArg(defaultExpr)` to the parameter `x`. This causes the syntax tree of `defaultExpr` to be
21+ * stored in the classfile.
22+ *
23+ * When using a default annotation argument, the compiler can recover the syntax tree and insert it in the
24+ * `AnnotationInfo`.
25+ *
26+ * For details, see `scala.reflect.internal.AnnotationInfos.AnnotationInfo`.
27+ */
28+ @ meta.param class defaultArg (arg : Any ) extends StaticAnnotation {
29+ def this () = this (null )
30+ }
You can’t perform that action at this time.
0 commit comments