← ZIO Direct docs

SourceCode

zio.direct.core.util.SourceCode
object SourceCode

Printer for fully elaborated representation of the source code. Futher customized based on SourceCode in the Dotty repo. In many situations if symbol.owner cannot be found the compiler will fail with a NoDenotation.owner error. This typically happens when there is some kind of upstream problem which is the cause of the real issue e.g. a foo.bar call where the bar doesn't actually exist. That means that the NoDenotation.owner error is just noise. Therefore the show___ methods now return a try that catches a custom NoDenotationException which callers of this object can deal with. A similar story happens with match-failures in extractors etc... in the original version of this class written for Dotty. Therefore the errors are being captured without the use of report.errorAndAbort.

Attributes

Source
SourceCode.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
SourceCode.type

Members list

Type members

Classlikes

class NoOwnerException(msg: String) extends Exception

Attributes

Source
SourceCode.scala
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def showConstant(using Quotes)(const: x$1.reflect.Constant)(showDetails: ShowDetails, syntaxHighlight: SyntaxHighlight, fullNames: Boolean): Try[String]

Attributes

Source
SourceCode.scala
def showFlags(using Quotes)(flags: x$1.reflect.Flags)(syntaxHighlight: SyntaxHighlight): String

Attributes

Source
SourceCode.scala
def showSymbol(using Quotes)(symbol: x$1.reflect.Symbol)(syntaxHighlight: SyntaxHighlight): String

Attributes

Source
SourceCode.scala
def showTree(using Quotes)(tree: x$1.reflect.Tree)(showDetails: ShowDetails, syntaxHighlight: SyntaxHighlight, fullNames: Boolean): Try[String]

Attributes

Source
SourceCode.scala
def showType(using Quotes)(tpe: x$1.reflect.TypeRepr)(showDetails: ShowDetails, syntaxHighlight: SyntaxHighlight, fullNames: Boolean): Try[String]

Attributes

Source
SourceCode.scala