All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.annotation.constructorOnly.scala Maven / Gradle / Ivy

There is a newer version: 3.6.3-RC1-bin-20241119-cc4a324-NIGHTLY
Show newest version
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2003-2013, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */

package scala.annotation

import scala.annotation.meta.*

/** 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.
 *  Note: the annotation is copied from constructor parameters to corresponding
 *  class fields. But it is checked that the field is eliminated before code
 *  is generated.
 */
@param @field class constructorOnly extends scala.annotation.StaticAnnotation




© 2015 - 2024 Weber Informatics LLC | Privacy Policy