aboutsummaryrefslogtreecommitdiff
path: root/core/shared/src/main/scala/interface.scala
diff options
context:
space:
mode:
authorMathias <mathias@decodified.com>2018-01-05 13:34:05 +0100
committerMathias <mathias@decodified.com>2018-01-05 13:39:57 +0100
commit2e98161a4c18d8f56280437a775cf81df030c0cf (patch)
tree087a7f7a4e3f3513a8e5e797c5f9ca1c373e03a9 /core/shared/src/main/scala/interface.scala
parentc2acc0fd2f4772ea1b6d3a59271fbe2d9063f69f (diff)
downloadmagnolia-2e98161a4c18d8f56280437a775cf81df030c0cf.tar.gz
magnolia-2e98161a4c18d8f56280437a775cf81df030c0cf.tar.bz2
magnolia-2e98161a4c18d8f56280437a775cf81df030c0cf.zip
Add support for `magnolia.debug` annotation
Diffstat (limited to 'core/shared/src/main/scala/interface.scala')
-rw-r--r--core/shared/src/main/scala/interface.scala12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/shared/src/main/scala/interface.scala b/core/shared/src/main/scala/interface.scala
index f0f104c..93aa045 100644
--- a/core/shared/src/main/scala/interface.scala
+++ b/core/shared/src/main/scala/interface.scala
@@ -188,4 +188,14 @@ final class SealedTrait[Typeclass[_], Type](val typeName: TypeName,
*/
final case class TypeName(ownerName: String, short: String) {
def full: String = s"$ownerName.$short"
-} \ No newline at end of file
+}
+
+/**
+ * This annotation can be attached to the implicit `gen` method of a type class companion,
+ * which is implemented by the `Magnolia.gen` macro.
+ * It causes magnolia to dump the macro-generated code to the console during compilation.
+ *
+ * @param typeNamePart If non-empty restricts the output generation to types
+ * whose full name contains the given [[String]]
+ */
+final class debug(typeNamePart: String = "") extends scala.annotation.StaticAnnotation \ No newline at end of file