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

camundala.bpmn.NameOf.scala Maven / Gradle / Ivy

There is a newer version: 1.30.23
Show newest version
package camundala.bpmn

import scala.quoted.{Expr, Quotes, Type}

object NameOf:

  def nameOfVariable(x: Expr[Any])(using Quotes): Expr[String] =
    val name = x.show.split("""\.""").last
      .replace(")", "") // attributes _.name -> returns name)
    println(s"Variable name: $name")
    Expr(name)
  end nameOfVariable

  def nameOfType[A](using Type[A], Quotes): Expr[String] =
    Expr(Type.show[A])
end NameOf




© 2015 - 2025 Weber Informatics LLC | Privacy Policy