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

io.udash.macros.ComponentIdMacro.scala Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
package io.udash
package macros

import scala.reflect.macros.blackbox

class ComponentIdMacro(val c: blackbox.Context) {

  import c.universe._

  final def IdObj: Tree = q"io.udash.component.ComponentId"

  def impl(): c.Tree = {
    val fqn = Iterator.iterate(c.internal.enclosingOwner)(_.owner).find(_.isClass).get.fullName.replace('.', '-')
    q"$IdObj.forName($fqn)"
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy