Packages

object whenAbsent

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. whenAbsent
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. macro def value[T]: T

    If you want your parameter to have _both_ a @whenAbsent annotation and a Scala-level default value, you can use this macro to avoid writing the default value twice:

    If you want your parameter to have _both_ a @whenAbsent annotation and a Scala-level default value, you can use this macro to avoid writing the default value twice:

    case class Record(@whenAbsent(0) i: Int = whenAbsent.value)

    This is useful when you want the default value to be collectible by macros (e.g. OpenApiMetadata for REST). which is possible only with default value in annotation.