trait
Printers extends AnyRef
Type Members
-
case class
BooleanFlag(value: Option[Boolean]) extends Product with Serializable
-
Concrete Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
def
+(other: String): String
-
def
->[B](y: B): (Printers, B)
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
object
BooleanFlag extends Serializable
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
ensuring(cond: (Printers) ⇒ Boolean, msg: ⇒ Any): Printers
-
def
ensuring(cond: (Printers) ⇒ Boolean): Printers
-
def
ensuring(cond: Boolean, msg: ⇒ Any): Printers
-
def
ensuring(cond: Boolean): Printers
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
-
-
-
def
showRaw(name: Universe.Name): String
-
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
treeToString(tree: Universe.Tree): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
→[B](y: B): (Printers, B)
Inherited from Any
Inherited by implicit conversion StringFormat from
Printers to StringFormat[Printers]
Inherited by implicit conversion ArrowAssoc from
Printers to ArrowAssoc[Printers]
EXPERIMENTAL
Utilities for nicely printing scala.reflect.api.Trees and scala.reflect.api.Types.
Printing Trees
The method
show
displays the "prettified" representation of reflection artifacts. This representation provides one with the desugared Java representation of Scala code. For example:The method
showRaw
displays internal structure of a given reflection object as a Scala abstract syntax tree (AST), the representation that the Scala typechecker operates on.Note, that while this representation appears to generate correct trees that one might think would be possible to use in a macro implementation, this is not usually the case. Symbols aren't fully represented (only their names are). Thus, this method is best-suited for use simply inspecting ASTs given some valid Scala code.
The method
showRaw
can also print scala.reflect.api.Types next to the artifacts being inspectedPrinting Types
The method
show
Like the method
showRaw
for scala.reflect.api.Trees,showRaw
for scala.reflect.api.Types provides a visualization of the Scala AST operated on by the Scala typechecker.printIds
and/orprintKinds
can additionally be supplied as arguments in a call toshowRaw
which additionally shows the unique identifiers of symbols.For more details about
Printer
s and other aspects of Scala reflection, see the Reflection Guide