trait
TypeAnnotations[A, T] extends DepFn0 with Serializable
Type Members
-
abstract
type
Out <: HList
Abstract Value Members
-
abstract
def
apply(): Out
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Provides the type annotations of type
A
of the fields or constructors of case class-like or sum typeT
.If type
T
is case class-like, this type class inspects its fields and provides their type annotations of typeA
. If typeT
is a sum type, its constructor types are looked for type annotations.Type
Out
is an HList having the same number of elements asT
(number of fields ofT
ifT
is case class-like, or number of constructors ofT
if it is a sum type). It is made ofNone.type
(no annotation on corresponding field or constructor) andSome[A]
(corresponding field or constructor is annotated).Method
apply
provides an HList of typeOut
made ofNone
(corresponding field or constructor not annotated) orSome(annotation)
(corresponding field or constructor has annotationannotation
).Note that type annotations must be case class-like for this type class to take them into account.
Example:
This implementation is based on shapeless.Annotations by Alexandre Archambault.