All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dongxiguo.zeroLog.context.NoCurrentMethod.scala Maven / Gradle / Ivy

The newest version!
package com.dongxiguo.zeroLog.context

import language.experimental.macros

sealed trait NoCurrentMethod

object NoCurrentMethod {

  final def noCurrentMethod_impl(c: scala.reflect.macros.Context) = {
    import c.universe._
    c.enclosingMethod match {
      case null =>
        reify(null)
      case currentDefTree: DefTree =>
        c.Expr(c.parse("implicitly[_root_.com.dongxiguo.zeroLog.context.NoCurrentMethod]"))
    }
  }

  implicit final def noCurrentMethod: NoCurrentMethod = macro noCurrentMethod_impl
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy