diff options
author | Jon Pretty <jon.pretty@propensive.com> | 2017-12-02 16:55:09 +0000 |
---|---|---|
committer | Jon Pretty <jon.pretty@propensive.com> | 2017-12-02 16:55:09 +0000 |
commit | bd5f2dc411b1d63b9ee4dfec6476ba27d8410e2a (patch) | |
tree | 035718067cb0ba32a3fc5f31453d40e510e09348 /core/shared/src/main/scala/interface.scala | |
parent | bf5fbc0373ffdff5bd7b269e2c0709fd92819641 (diff) | |
parent | fba0c1cb94d4d67c48db8fb283c5dc1fedbf215a (diff) | |
download | magnolia-bd5f2dc411b1d63b9ee4dfec6476ba27d8410e2a.tar.gz magnolia-bd5f2dc411b1d63b9ee4dfec6476ba27d8410e2a.tar.bz2 magnolia-bd5f2dc411b1d63b9ee4dfec6476ba27d8410e2a.zip |
Merge branch 'master' into virtual-params
Diffstat (limited to 'core/shared/src/main/scala/interface.scala')
-rw-r--r-- | core/shared/src/main/scala/interface.scala | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/shared/src/main/scala/interface.scala b/core/shared/src/main/scala/interface.scala index 25dd1fd..5043680 100644 --- a/core/shared/src/main/scala/interface.scala +++ b/core/shared/src/main/scala/interface.scala @@ -34,7 +34,7 @@ trait Param[Typeclass[_], Type] { /** the type of the parameter being represented * - * For exmaple, for a case class, + * For example, for a case class, * <pre> * case class Person(name: String, age: Int) * </pre> @@ -46,6 +46,17 @@ trait Param[Typeclass[_], Type] { /** the name of the parameter */ def label: String + /** flag indicating a repeated (aka. vararg) parameter + * + * For example, for a case class, + * <pre> + * case class Account(id: String, emails: String*) + * </pre> + * the [[Param]] instance corresponding to the `emails` parameter would be `repeated` and have a + * [[PType]] equal to the type `Seq[String]`. Note that only the last parameter of a case class + * can be repeated. */ + def repeated: Boolean + /** the typeclass instance associated with this parameter * * This is the instance of the type `Typeclass[PType]` which will have been discovered by |