aboutsummaryrefslogtreecommitdiff
path: root/core/shared/src/main/scala/interface.scala
diff options
context:
space:
mode:
authorJon Pretty <jon.pretty@propensive.com>2017-11-30 13:47:15 +0100
committerGitHub <noreply@github.com>2017-11-30 13:47:15 +0100
commitc698d7db4b6e89392b8ae399333a89b167db20c7 (patch)
treebf4a34e519dec8992ded3f92b7ec4acec08c1826 /core/shared/src/main/scala/interface.scala
parent834af65ed610d6b1b278b5204801306808a90645 (diff)
parente2191e2687b671d4a8610544251e7e807f2793da (diff)
downloadmagnolia-c698d7db4b6e89392b8ae399333a89b167db20c7.tar.gz
magnolia-c698d7db4b6e89392b8ae399333a89b167db20c7.tar.bz2
magnolia-c698d7db4b6e89392b8ae399333a89b167db20c7.zip
Merge branch 'master' into patch-1
Diffstat (limited to 'core/shared/src/main/scala/interface.scala')
-rw-r--r--core/shared/src/main/scala/interface.scala13
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 54f8ce3..193a6f9 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