From 2e98161a4c18d8f56280437a775cf81df030c0cf Mon Sep 17 00:00:00 2001 From: Mathias Date: Fri, 5 Jan 2018 13:34:05 +0100 Subject: Add support for `magnolia.debug` annotation --- core/shared/src/main/scala/interface.scala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'core/shared/src/main/scala/interface.scala') 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 -- cgit v1.2.3