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

io.getquill.quotation.Bindings.scala Maven / Gradle / Ivy

There is a newer version: 4.6.0
Show newest version
package io.getquill.quotation

import scala.reflect.macros.whitebox.Context

object Bindings {
  def apply(c: Context)(quoted: c.Tree, tpe: c.Type): Map[c.Symbol, c.Tree] = {
    import c.universe._
    tpe
      .member(TermName("bindings"))
      .typeSignature.decls.collect {
        case m: MethodSymbol if (m.isGetter) =>
          m ->
            q"""
              {
                import language.reflectiveCalls
                $quoted.bindings.$m
              }
            """
      }.toMap
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy