Compiler

scala.quoted.staging.Compiler
See theCompiler companion trait
object Compiler

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Compiler.type

Members list

Type members

Classlikes

case class Settings

Setting of the Compiler instance.

Setting of the Compiler instance.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Settings

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Settings.type

Value members

Concrete methods

Create a new instance of the compiler using the the classloader of the application.

Create a new instance of the compiler using the the classloader of the application.

Usage:

import scala.quoted.staging._
given Compiler =
  object Dummy
  Compiler.make(Dummy.getClass.getClassLoader)

Note that we use an instance of Dummy to get the classloader that loaded the application. Any other instance of a class defined in the application would also work. Using a class defined in the standard library should be avoided as it might be loaded by a different classloader.

If the given compiler is defined in one of your classes (e.i. not as a top-level definition), then the compiler can be instantiated with:

given Compiler = Compiler.make(this.getClass.getClassLoader)

Value parameters

appClassloader

classloader of the application that generated the quotes

settings

compiler settings

Attributes

Returns

A new instance of the compiler