scala.annotation

Type members

Classlikes

A base trait for annotations that yield proper subtypes of the types they annotate. Refining annotations are more "sticky" than normal ones. They are conceptually kept around when normal refinements would also not be stripped away.

A base trait for annotations that yield proper subtypes of the types they annotate. Refining annotations are more "sticky" than normal ones. They are conceptually kept around when normal refinements would also not be stripped away.

An annotation that goes on parameters of classes or traits. It asserts that the parameter is used only for initialization and is not kept in the class as a field. Violations of this assertion are flagged as compile errors. The annotation is particularly useful for implicit parameters since for these a textual scan is not sufficient to know where they are used.

An annotation that goes on parameters of classes or traits. It asserts that the parameter is used only for initialization and is not kept in the class as a field. Violations of this assertion are flagged as compile errors. The annotation is particularly useful for implicit parameters since for these a textual scan is not sufficient to know where they are used.

final class static extends StaticAnnotation

https://github.com/scala/scala.github.com/pull/491

final class targetName(name: String) extends StaticAnnotation

An annotation that defines an external name for a definition. If an targetName(extname) annotation is given for a method or some other definition, its implementation will use the name extname instead of the regular name.

An annotation that defines an external name for a definition. If an targetName(extname) annotation is given for a method or some other definition, its implementation will use the name extname instead of the regular name.

final class threadUnsafe extends StaticAnnotation

This annotation can only be used on a field which defines a lazy val. When this annotation is used, the initialization of the lazy val will use a faster mechanism which is not thread-safe.

This annotation can only be used on a field which defines a lazy val. When this annotation is used, the initialization of the lazy val will use a faster mechanism which is not thread-safe.

An annotation that can be used from Scala 2 to mark a trait as transparent. Scala 3 code would use the modifier transparent instead. Transparent traits are not inferred when combined with other types in an intersection. See reference/other-new-features/transparent-traits.html for details.

An annotation that can be used from Scala 2 to mark a trait as transparent. Scala 3 code would use the modifier transparent instead. Transparent traits are not inferred when combined with other types in an intersection. See reference/other-new-features/transparent-traits.html for details.

Deprecated classlikes

@deprecated("use @targetName instead")
final class alpha(externalName: String) extends StaticAnnotation

An annotation that defines an external name for a definition. If an alpha(extname) annotation is given for a method or some other definition, its implementation will use the name extname instead of the regular name. An alpha annotation is mandatory for definitions with symbolic names.

An annotation that defines an external name for a definition. If an alpha(extname) annotation is given for a method or some other definition, its implementation will use the name extname instead of the regular name. An alpha annotation is mandatory for definitions with symbolic names.

Deprecated